From e8b1d617a14eccb6d798b84e2424e1c1abbb8280 Mon Sep 17 00:00:00 2001 From: Arnaud Faucon Date: Wed, 30 Oct 2019 09:14:45 +0100 Subject: [PATCH] pass the clear persistent cart variable to the cart emptied actions --- includes/class-wc-cart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php index c40b0011d7a..8d875435b20 100644 --- a/includes/class-wc-cart.php +++ b/includes/class-wc-cart.php @@ -637,7 +637,7 @@ class WC_Cart extends WC_Legacy_Cart { */ public function empty_cart( $clear_persistent_cart = true ) { - do_action( 'woocommerce_before_cart_emptied' ); + do_action( 'woocommerce_before_cart_emptied', $clear_persistent_cart ); $this->cart_contents = array(); $this->removed_cart_contents = array(); @@ -653,7 +653,7 @@ class WC_Cart extends WC_Legacy_Cart { $this->fees_api->remove_all_fees(); - do_action( 'woocommerce_cart_emptied' ); + do_action( 'woocommerce_cart_emptied', $clear_persistent_cart ); } /**