woocommerce_before_cart_emptied

woocommerce_before_cart_emptied

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

do_action('woocommerce_before_cart_emptied') is found 1 times:

  • /includes/class-wc-cart.php line 637
    	 * @param bool $clear_persistent_cart Should the persistent cart be cleared too. Defaults to true.
    	 */
    	public function empty_cart( $clear_persistent_cart = true ) {
    
    		do_action( 'woocommerce_before_cart_emptied', $clear_persistent_cart );
    
    		$this->cart_contents              = array();
    		$this->removed_cart_contents      = array();
    		$this->shipping_methods           = array();
    		$this->coupon_discount_totals     = array();
    		$this->coupon_discount_tax_totals = array();