Created
February 21, 2015 21:02
-
-
Save yojance/0aa3465e8250e1d65c4e to your computer and use it in GitHub Desktop.
Product From A Category AND 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 AND 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