Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sarancartrabbit/4c0c843a42389378a674371b8640ec55 to your computer and use it in GitHub Desktop.
Save sarancartrabbit/4c0c843a42389378a674371b8640ec55 to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - set discount calculate issue when wpml
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