Fired after qty has been changed.
$cart_item_key, $quantity, $this
Sortie :
@param string $cart_item_key contains the id of the cart item. This may be empty if the cart item does not exist any more. @param int $quantity contains the quantity of the item. @param WC_Cart $this Cart class.
// Ajouter une fonction au hook action 'woocommerce_cart_item_set_quantity'
add_action('woocommerce_cart_item_set_quantity', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($cart_item_key, $quantity, $this) {
// Votre code ici
error_log('Hook woocommerce_cart_item_set_quantity déclenché');
}
Chargement des actualités...