Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Woo Discount Rules: Composite product compatible
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
You can’t perform that action at this time.