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.
! $virtual_downloadable_item, $product, $this->get_id(
Sortie :
@return bool
// 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;
}
Chargement des actualités...