woocommerce_remove_cart_item_from_session action-hookWC 3.6.0

Fires when cart item is removed from the session.

Usage

add_action( 'woocommerce_remove_cart_item_from_session', 'wp_kama_woocommerce_remove_cart_item_from_session_action', 10, 3 );

/**
 * Function for `woocommerce_remove_cart_item_from_session` action-hook.
 * 
 * @param string     $key     Cart item key.
 * @param array      $values  Cart item values e.g. quantity and product_id.
 * @param WC_Product $product The product being added to the cart.
 *
 * @return void
 */
function wp_kama_woocommerce_remove_cart_item_from_session_action( $key, $values, $product ){

	// action...
}
$key(string)
Cart item key.
$values(array)
Cart item values e.g. quantity and product_id.
$product(WC_Product)
The product being added to the cart.

Changelog

Since 3.6.0 Introduced.

Where the hook is called

WC_Cart_Session::get_cart_from_session()
woocommerce_remove_cart_item_from_session
woocommerce/includes/class-wc-cart-session.php 163
do_action( 'woocommerce_remove_cart_item_from_session', $key, $values, $product );
woocommerce/includes/class-wc-cart-session.php 188
do_action( 'woocommerce_remove_cart_item_from_session', $key, $values );
woocommerce/includes/class-wc-cart-session.php 196
do_action( 'woocommerce_remove_cart_item_from_session', $key, $values );

Where the hook is used in WooCommerce

Usage not found.