Created
December 7, 2015 22:19
-
-
Save BurlesonBrad/fc0fdbeb58c057c49f58 to your computer and use it in GitHub Desktop.
for Louise
This file contains hidden or 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
| add_filter( 'woocommerce_add_cart_item_data', 'rodolpho_is_a_sexy_beast_empty_cart', 10, 3); | |
| function rodolpho_is_a_sexy_beast_empty_cart( $cart_item_data, $product_id, $variation_id ) | |
| { | |
| global $woocommerce; | |
| if ( $product_id == 851 ) { | |
| $woocommerce->cart->empty_cart(); | |
| } | |
| return $cart_item_data; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment