Last active
April 11, 2022 08:30
-
-
Save AnanthFlycart/2e72653a9705ddeaff28f26f6149e062 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
| // Merge all the Discount Bars | |
| add_filter('advanced_woo_discount_rules_advance_table_based_on_rule', function($advanced_layout, $rule, $discount_calculator, $product, $product_price, $html_content) { | |
| if (is_array($advanced_layout) && isset($advanced_layout[0]['badge_bg_color']) && !empty(isset($advanced_layout[0]['badge_bg_color'])) && method_exists($rule, 'getId')) { | |
| $advanced_layout[0]['rule_id'] = $rule->getId(); | |
| } | |
| return $advanced_layout; | |
| }, 10, 6); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment