How to use?

//woo hook for add to cart
do_action( 'woocommerce_add_to_cart',  $cart_item_key,  $product_id,  $quantity,  $variation_id,  $variation,  $cart_item_data ); 

Callback function

// define the woocommerce_add_to_cart callback with custom functionality
function dcs_woocommerce_add_to_cart( $cart_item_key, $product_id, $quantity, $variation_id, $variation, $cart_item_data ) { 
    // Your ation here.... 
// add the callback 
add_action( 'woocommerce_add_to_cart', 'dcs_woocommerce_add_to_cart', 10, 6 ); 

How to remove hook?

remove_action( 'woocommerce_add_to_cart', 'action_woocommerce_add_to_cart', 10, 6 ); 

Any comment?

Your email address will not be published. Required fields are marked *