Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AshlinRejo/610f04eee06694c3125ec44f2e452c20 to your computer and use it in GitHub Desktop.
Save AshlinRejo/610f04eee06694c3125ec44f2e452c20 to your computer and use it in GitHub Desktop.
Woo Discount Rules: To handle specific attribute based on all selected attributes
if(!function_exists('woo_discount_rules_price_rule_check_in_all_selected_attributes_method')){
/**
* Rule based on all attributes
*
* @param boolean $in_all_attribute
* @param int $rule_order_id
* @return boolean
* */
function woo_discount_rules_price_rule_check_in_all_selected_attributes_method($in_all_attribute, $rule_order_id){
return true;
}
}
add_filter('woo_discount_rules_price_rule_check_in_all_selected_attributes', 'woo_discount_rules_price_rule_check_in_all_selected_attributes_method', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment