Created
February 21, 2015 21:01
-
-
Save yojance/969e9a4c5ee53332cf09 to your computer and use it in GitHub Desktop.
Product From A Category In The Cart OR Minimum Cart Total
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 | |
// Product From A Category In The Cart OR Minimum Cart Total | |
function qualifies_for_incentive() { | |
// Incentive product we are giving away | |
$incentive_product_id = 102; | |
if( qualifies_basedon_product_category( 'premium-quality' ) | |
|| qualifies_basedon_cart_total( 199 ) ) { | |
add_incentive_to_cart( $incentive_product_id ); | |
} else { | |
remove_incentive_from_cart( $incentive_product_id ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment