Created
May 6, 2024 06:16
-
-
Save sarancartrabbit/4c0c843a42389378a674371b8640ec55 to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - set discount calculate issue when wpml
This file contains 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_current_discount_amount', function($current_discount_amount, $price_discount){ | |
if(!empty($price_discount['discount_rule_type']) && $price_discount['discount_rule_type'] == 'set_discount'){ | |
return $price_discount['discount_value']; | |
} | |
return $current_discount_amount; | |
}, 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment