Merge pull request #22846 from teloconf/master
[ADD] Do Action before cart is emptied
This commit is contained in:
commit
c655c2e38a
|
@ -634,6 +634,9 @@ class WC_Cart extends WC_Legacy_Cart {
|
|||
* @param bool $clear_persistent_cart Should the persistant cart be cleared too. Defaults to true.
|
||||
*/
|
||||
public function empty_cart( $clear_persistent_cart = true ) {
|
||||
|
||||
do_action( 'woocommerce_before_cart_emptied' );
|
||||
|
||||
$this->cart_contents = array();
|
||||
$this->removed_cart_contents = array();
|
||||
$this->shipping_methods = array();
|
||||
|
|
Loading…
Reference in New Issue