Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AshlinRejo/f99867d818a02247400bce505e9533df to your computer and use it in GitHub Desktop.
Save AshlinRejo/f99867d818a02247400bce505e9533df to your computer and use it in GitHub Desktop.
Discount Rules v2: Disable the discount table for specific rules
add_filter( 'advanced_woo_discount_rules_hide_specific_rules_in_bulk_table', function($status, $rule_id, $rule, $product){
$exclude_rule_id = array(10, 12);//Here we need to enter rule id
if(in_array($rule_id, $exclude_rule_id)){
$status = true; //Set as true if we want to disable discount table in front end.
}
return $status;
}, 10, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment