woocommerce_cart_item_set_quantity

ACTION woocommerce\includes\class-wc-cart.php (ligne 1435) github
Fired after qty has been changed.

Paramètres

Entrée :
$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.

Utilisation

// 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é');
}

Actualités

Chargement des actualités...