Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AshlinRejo/7483dcfac92b5d9e9c336c4058feb684 to your computer and use it in GitHub Desktop.
Save AshlinRejo/7483dcfac92b5d9e9c336c4058feb684 to your computer and use it in GitHub Desktop.
Discount rules v2: Fix for applying discount in cart even if it does not matches
add_filter('advanced_woo_discount_rules_modify_price_html', function ($do_strikeout){
if(function_exists('is_cart')){
if(is_cart()){
$do_strikeout = false;
}
}
return $do_strikeout;
});
add_filter('advanced_woo_discount_rules_use_sale_badge_percentage_customization', function ($do_strikeout){
if(function_exists('is_cart')){
if(is_cart()){
$do_strikeout = false;
}
}
return $do_strikeout;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment