woocommerce_cart_item_removed
Использование
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
- -
Где вызывается хук
woocommerce_cart_item_removed
woocommerce/includes/class-wc-cart.php 1388
do_action( 'woocommerce_cart_item_removed', $cart_item_key, $this );
Где используется хук в WooCommerce
woocommerce/includes/class-wc-cart-session.php 81
add_action( 'woocommerce_cart_item_removed', array( $this, 'persistent_cart_update' ) );
woocommerce/includes/class-wc-cart.php 133
add_action( 'woocommerce_cart_item_removed', array( $this, 'calculate_totals' ), 20, 0 );