Last active
November 16, 2022 09:49
-
-
Save AshlinRejo/8e6183fcc53e5b191e06fc9ee966e074 to your computer and use it in GitHub Desktop.
Discount rule v2: Disable calculate cheapest on cart for product request
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_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