woocommerce_before_cart_emptied action-hookWC 1.0

Empties the cart and optionally the persistent cart too.

Usage

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.
Default: true

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.