Created
February 17, 2022 09:56
-
-
Save AshlinRejo/f99867d818a02247400bce505e9533df to your computer and use it in GitHub Desktop.
Discount Rules v2: Disable the discount table for specific rules
This file contains hidden or 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
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