Merge pull request #24930 from arnofo/feature/empty-cart-action-new-parameter

pass the clear persistent cart variable to the cart emptied actions
This commit is contained in:
Gerhard Potgieter 2019-11-20 12:52:36 +02:00 committed by GitHub
commit 95a0a4c0a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -637,7 +637,7 @@ class WC_Cart extends WC_Legacy_Cart {
*/ */
public function empty_cart( $clear_persistent_cart = true ) { 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->cart_contents = array();
$this->removed_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(); $this->fees_api->remove_all_fees();
do_action( 'woocommerce_cart_emptied' ); do_action( 'woocommerce_cart_emptied', $clear_persistent_cart );
} }
/** /**