woocommerce_order_item_needs_processing

FILTER woocommerce\includes\class-wc-order.php (ligne 1839) github
See if the order needs processing before it can be completed. Orders which only contain virtual, downloadable items do not need admin intervention. Uses a transient so these calls are not repeated multiple times, and because once the order is processed this code/transient does not need to persist.

Paramètres

Entrée :
! $virtual_downloadable_item, $product, $this->get_id(
Sortie :
@return bool

Utilisation

// Modifier la valeur avec le filtre 'woocommerce_order_item_needs_processing'
add_filter('woocommerce_order_item_needs_processing', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(! $virtual_downloadable_item) {
    // Modifier la valeur
    return ! $virtual_downloadable_item;
}

Actualités

Chargement des actualités...