Created
August 2, 2017 20:42
-
-
Save vishalck/542a34ff32a8d976dbff6927d994436f to your computer and use it in GitHub Desktop.
Initiate WooCommerce Empty Cart Action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function woo_empty_cart_action() { | |
global $woocommerce; | |
if ( isset( $_REQUEST[ 'emptycart' ] ) && $_REQUEST[ 'emptycart' ] == 'yes' ) { | |
$woocommerce->cart->empty_cart(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment