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

Empties the cart and optionally the persistent cart too.

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

add_action( 'woocommerce_before_cart_emptied', 'wp_kama_woocommerce_before_cart_emptied_action' );

/**
 * Function for `woocommerce_before_cart_emptied` action-hook.
 * 
 * @param bool $clear_persistent_cart Should the persistent cart be cleared too.
 *
 * @return void
 */
function wp_kama_woocommerce_before_cart_emptied_action( $clear_persistent_cart ){

	// action...
}
$clear_persistent_cart(true|false)
Should the persistent cart be cleared too.
По умолчанию: true

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

WC_Cart::empty_cart()
woocommerce_before_cart_emptied
woocommerce/includes/class-wc-cart.php 635
do_action( 'woocommerce_before_cart_emptied', $clear_persistent_cart );

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

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