Created
February 7, 2019 06:53
-
-
Save AshlinRejo/37f38d2bac9d99603ea54038a755ad99 to your computer and use it in GitHub Desktop.
Woo Discount Rules: Composite product compatible
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
if(!function_exists('woo_discount_rules_exclude_cart_item_from_discount_method')){ | |
function woo_discount_rules_exclude_cart_item_from_discount_method($status, $cart_item){ | |
if(isset($cart_item['composite_item']) && !empty($cart_item['composite_item'])){ | |
$status = true; | |
} | |
return $status; | |
} | |
} | |
add_filter('woo_discount_rules_exclude_cart_item_from_discount', 'woo_discount_rules_exclude_cart_item_from_discount_method', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment