woocommerce_cart_item_removed хук-событиеWC 1.0

Использование

add_action( 'woocommerce_cart_item_removed', 'wp_kama_woocommerce_cart_item_removed_action', 10, 2 );

/**
 * Function for `woocommerce_cart_item_removed` action-hook.
 * 
 * @param  $cart_item_key 
 * @param  $that          
 *
 * @return void
 */
function wp_kama_woocommerce_cart_item_removed_action( $cart_item_key, $that ){

	// action...
}
$cart_item_key
-
$that
-

Где вызывается хук

WC_Cart::remove_cart_item()
woocommerce_cart_item_removed
woocommerce/includes/class-wc-cart.php 1315
do_action( 'woocommerce_cart_item_removed', $cart_item_key, $this );

Где используется хук в WooCommerce

woocommerce/includes/class-wc-cart-session.php 79
add_action( 'woocommerce_cart_item_removed', array( $this, 'persistent_cart_update' ) );
woocommerce/includes/class-wc-cart.php 108
add_action( 'woocommerce_cart_item_removed', array( $this, 'calculate_totals' ), 20, 0 );