Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AshlinRejo/8e6183fcc53e5b191e06fc9ee966e074 to your computer and use it in GitHub Desktop.
Save AshlinRejo/8e6183fcc53e5b191e06fc9ee966e074 to your computer and use it in GitHub Desktop.
Discount rule v2: Disable calculate cheapest on cart for product request
add_filter('advanced_woo_discount_rules_calculate_cheapest_discount', function ($process, $rule, $cart_item, $is_cart){
if(function_exists('is_cart')){
if(is_cart() && !$is_cart){
$process = false;
}
}
return $process;
}, 10, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment