Created
November 15, 2023 11:06
-
-
Save AnanthFlycart/5b0e145dcb4115b8ebd7f3b080c87f75 to your computer and use it in GitHub Desktop.
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('woocommerce_available_variation', function($data, $variable_product, $variation) { | |
| if (isset($data['display_price'])) { | |
| $discount_details = apply_filters('advanced_woo_discount_rules_get_product_discount_details', false, $variation); | |
| if ($discount_details !== false) { | |
| $data['display_price'] = $discount_details['discounted_price_based_on_tax_settings']; | |
| } | |
| } | |
| return $data; | |
| }, 100, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment