Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save AshlinRejo/f7f57697059106633435d22ec99022ca to your computer and use it in GitHub Desktop.

Select an option

Save AshlinRejo/f7f57697059106633435d22ec99022ca to your computer and use it in GitHub Desktop.
Discount rules v2: Disable ajax request for loading discount table on other than product detail page
add_action('advanced_woo_discount_rules_before_initialize', function (){
add_filter('advanced_woo_discount_rules_disable_load_dynamic_bulk_table', function($status) {
$status = "off";
if (is_product()) {
$status = "on";
}
return $status;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment