Last active
September 2, 2020 14:36
-
-
Save Balakrishnan-flycart/bb35ef83e79a1b4ced341bceb11c16ce to your computer and use it in GitHub Desktop.
Woo Discount Rules v2 - Bulk rule individual quantity count(Line item count)
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_change_bulk_rule_quantity', function($quantity, $cart_items, $product, $cart_quantity, $price_display_condition, $is_cart, $manual_request, $rule_id){ | |
| $rule_array = array(1,2,3); //Include rule id here | |
| if($is_cart && in_array($rule_id, $rule_array)){ | |
| return $cart_quantity; | |
| } | |
| return $quantity; | |
| }, 8, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment