=== Discount Rules Pro for WooCommerce === Contributors: flycart Donate link: https://flycart.org/ Tags: woocommerce, coupons, discounts, dynamic pricing, woocommerce coupon, Buy One Get One Free, pricing deals, bulk discount, discount rules, auto-apply coupons, category discounts, url coupons Requires at least: 4.4.1 Tested up to: 6.2 Stable tag: 2.6.1 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html Create simple and flexible WooCommerce discounts, dynamic pricing discounts, BOGO discounts and more. A powerful WooCommerce discount & WooCommerce coupon plugin. == Description == [Discount Rules for WooCommerce](https://www.flycart.org/products/wordpress/woocommerce-discount-rules) helps you to create any type of bulk discounts, dynamic pricing, advanced discounts, percentage discounts, product based discounts, tiered discounts for your products. Offer Product quantity based discounts, cart based discounts at a percentage or fixed amount or discount based on total order. Create Buy One and Get one free (BOGO) deals and increase your sales multifold by offering dynamic pricing and discounts based on categories, products, user roles, cart items, purchase history and much more in the pro version. You can set discounts for products and product variations. You can also set discounts based on categories, attributes, customers, user roles in the pro version. Discounts will be visible in product page, product details page, cart, checkout and in email notifications. Display the pricing discount table beautifully on the product page. Start selling more and retain customers by running promotions with the best dynamic pricing and discount plugin for WooCommerce. [View Demo](https://demo.flycart.net/woo-discount-rules) | [Documentation with real examples](https://docs.flycart.org/en/collections/806883-woocommerce-discount-rules) | [Ask Questions](https://www.flycart.org/support) | [PRO version](https://www.flycart.org/products/wordpress/woocommerce-discount-rules) | [Examples](https://www.flycart.org/woocommerce-discount-rules-examples) == DISCOUNT TYPES AND FEATURES == = Free version features = * Percentage based discounts in WooCommerce * [Store-wide global discount](https://docs.flycart.org/en/articles/3788550-product-adjustment-discount-rules-2-0) * Quantity range based tiered pricing percentage discount (Example: Buy 3 to 7 quantities, get 10%, Buy 8 to 12 quantities, get 20%) * Cart based percentage discount (Example: Spend more than $1000, get 10% discount) * Order total based discount * Number of line items (count) based discount (Example: Purchase 4 different products or variants and get 10% discount) * Exclude selected products from discount rules (product price based rules) * Date based discount (validity) * Show discount table on product pages [PRO version](https://www.flycart.org/products/wordpress/woocommerce-discount-rules) = PRO features = * All features of the free version, plus) * Fixed price discounts ( Get $9 discount for purchasing over 6 items) * Category specific discount conditions ( Get 25 % off on all items under Summer Collection ) * Buy One Get One Free discounts in WooCommerce (BOGO Deals) [Example: Buy 2 get 1 cheapest product free](https://docs.flycart.org/en/articles/3810570-buy-x-get-y-discount-rules-2-0) * Dynamic pricing and discounts for WooCommerce * [Specific product based discounts (Buy Product A and get 10% discount)](https://docs.flycart.org/en/articles/4217898-discounts-on-specific-product-simple-and-variable-products-from-version-2-0) * [User role based dynamic pricing and discounts for your WooCommerce store (Example: Wholesale customers get a discounted price)](https://docs.flycart.org/en/articles/4203313-user-role-based-discount-rules-discount-rules-2-0) * Dependant product based discounts (Buy Product A and get discount on Product B) * Bundle / package deal (Buy 3 items for $10. 4th item will be charge full price) * Offer one or more free products (Multiple products could be offered free using a rule) * [Coupon code activated discount rules - The discount will apply after a coupon is entered.](https://docs.flycart.org/en/articles/4268595-activate-discount-rule-using-a-coupon-code-in-woocommerce-2-0) * Option to set discount for each product variant. * Attribute specific discount (Buy Small size T-shirts and get 10% discount) * Option to set Discount for All Products or Global Discount * Discount for customers with specific domains (10% discount for all emails ending with @acme.com) * Customer specific discount (10% discount for selected customers) * [Shipping / Delivery location based discount (Example: If shipping destination is California, get 15% discount)](https://docs.flycart.org/en/articles/4214869-customer-shipping-address-based-discount-2-0) * Purchase history based discount (Customers who spent $100 in previously get 10% discount) * Discount based on the number of orders placed earlier (Example: 10% discount for customers with 5 or more orders) * If customer purchased selected products previously, he can get a discount (Example: Customers who purchased Shoes get 10% discount) * Applying multiple discount rules in a purchase (Get 5% for order above $500 and 10 % for buying more than 6 items) * Cart discounts by sum of item quantities in cart (Order more than 10 items from any category and get 15 % discount) * Cart discounts by selected customers (John gets 25% life time discount. Ellen gets 10 % limited period offer) * Cart discounts by fixed price discounts (Flat $50 discount for all orders today) * Buy 3 units of Product A and get flat $25 discount * Add 3 products to the cart and get the Cheapest Item free * [Buy any 10 products from Specific category and get a Product Free from Category B](https://docs.flycart.org/en/articles/3946511-buy-any-items-from-category-a-and-get-20-discount-on-category-b) * Buy Product A and Product B from Category Electronics and get a free product from category Accessories * Buy any Product from Category Mobile and choose a free product from Category Hard Cases * Option to offer free products only from certain category * Exclude products on SALE from discount rules * SALE Badge for discounted products (When the rules match) * Option to show or hide the discounted price * Priority support for PRO version == Examples == = Category Discount Rules: = * Buy T-shirts from Category Apparel and save 10% * Get 30% off on Category A & Category B * Purchase any 6 items from Category A and get 25% discount on total cart value. * Purchase 3 products from Category A or B or C or from all of them and get 20% discount valid from dd/mm/yyyy to dd/mm/yyyy = Quantity range based tiered pricing discounts = * Buy 1 to 5 quantities, get $2 discount, Buy 6 or more, get $3 discount * [Buy 2 to 3 quantities, get 10% discount, 4-5 quantities, get 20%, 6-8, get 30%](https://docs.flycart.org/en/articles/3914904-bulk-discounts-tiered-pricing-discounts-discount-rules-2-0) = Product Variant Discounts: = * Get 50% off on Nike T-shirts Small and Large Sizes * Buy a Small Size Tee and get a small Size shorts free * You can customise the Variants discounts in several combinations = Product Dependant rule: = * [Buy Product A at full price and get 20% discount in Product B](https://docs.flycart.org/en/articles/3953967-buy-x-and-get-y-product-for-free-or-at-50-discount-discount-rules-2-0) * Buy 2 quantities of Product A, 2 quantities of Product and get 30% discount in Product C * Buy 3 quantities of Product A and get flat $10 off in product B * Buy a Mobile and get 20% off on headphone = BOGO deals: = * Buy one and get one free of the same product * Buy 2 get one cheapest free offer (repeat) * Buy X get Y product free Eg: Buy 3 product and get a pendrive free (or with 50% discount) * Buy Any 2 items from Category X, and get a Product free from Category B * Buy X products and get X number of products free * Buy 3 products from any category, get 1 free. Buy 6 products, get 2 products free.... * Buy 12 products (any or category specific), get X number of cheapest among them free * Free products can be a few selected products, cheapest products in the entire store or from selected categories. * Products can be offered either free (100% discount) or a limited percentage discount (50%) = Cart Discount Rules: = * [All Orders above $500 will get 15% discount](https://docs.flycart.org/en/articles/3894861-subtotal-based-tiered-discounts-discount-rules-2-0) * Add two to six products in cart and get flat $30 discount. * 10% discount for all retailers (User Role specific discount) * All orders above $500 will get 15% discount * Buy 2 products and get 20% discount * Discount for products from specific categories only * Free shipping for orders above $100 * Coupon code activated cart discount rules * Discount based on total order = Product Specific Discount = * Shoes get 20% discount, T-Shirts get 5% discount * Adidas Special Edition Shoe (A specific product) gets 15% discount for 10 days * Buy 10 mugs are more and get 5% off * Buy 3 for $10, Buy 6 for $20 = Fixed Price Per Unit = * Set a fixed price per unit (Product A cost is $20. Buy 5 to 10 quantity for $15 per unit, 11 and above for $10 each) * Price can be set for a specific product or variant. * If your entire category of products have the same price, you can use this to set a reduced price = User Role based Discount = * Bulk discount based on user role for specific product or product categories. * Members of Wholesale customers group gets 40% discount, while Retail customers get 5% discount = Bundle / Package deal = * Create offers like Buy 3 items for $10. 4th item will be charged full price. * Repeat the discount easily. Example: Buy 3 for $10, 6 for $20 = Discount rules activated by coupon = * Activate / Trigger a discount rule upon entering a coupon code (useful when you want to provide discount to a target group of users) = Global Discount Storewide = * 20% discount on all items in the store till December 25 * All Products get 10% discount = Attributes specific discount = * Discount based on the product attributes (NOTE: The attributes should be defined at Product -> Attributes) * Example: 10% discount for purchase of T-Shirt with Small sizes. = Shipping Address Based Discount = * Flat 25% discount at Cart for Customers from New York * Customers from California get 10% discount while those from Texas get 5% = Purchase history based discount = * Discount based on the total amount spent by the customer in previous orders * Discount based on the total number of orders placed by the customer * Based on purchase history (Example: Provide 10% discount to all customers who purchased Shoes earlier) * Purchase history for a specific period (10% discount for those who spent $500 in the last 3 months) = Adjustment rules = * Category specific discount on product price * Date and Time based discount on product price * Item Quantity based discount on product price * Cart subtotal range based discount on cart total * Number of Items in cart * Total Sum of Item quantities * Shipping address based discount rule * Discount based on First Product = Conditions based on = Conditions can be based products, categories, customers, customer roles, shipping location, coupons, purchase history, order total amount, items in cart and more. * All products * Customer purchase history * Specific products / Selected products * All categories * Selected categories * All customers * Selected customers * All customer roles * Selected customer roles * All Shipping locations * Selected shipping locations = Rules apply based on = * Products * Line items in cart * Cart subtotal * Line item quantity * Total cart quantity * Purchase history * Category * User roles * Attributes = Need assistance with the discount set up? Reach out to us = Though we have made the rule creation so simple with just 3 steps, you might still be having a few doubts. Or simply you might want to re-check if your setup is correct or you might be having a unique discount promo to run in your website. Don't worry. Feel free to reach out to us via the Live Chat in our website or via the [support request form](https://www.flycart.org/support). We are happy to help you and guide you with the set up. = Website = [https://www.flycart.org/products/wordpress/woocommerce-discount-rules](https://www.flycart.org/products/wordpress/woocommerce-discount-rules) = Documentation = [https://docs.flycart.org/en/collections/806883-woocommerce-discount-rules](https://docs.flycart.org/en/collections/806883-woocommerce-discount-rules) = Got questions? = Just reach out to us and we will get back to you. You can either contact us via the Live Chat or via the [support request form](https://www.flycart.org/support) == Installation == Just use the WordPress installer or upload to the /wp-content/plugins folder. Then Activate the Woo Discount Rules plugin. More information could be found in the documentation = Minimum Requirements = * WordPress 4.6.1 or greater * WooCommerce 3.0.0 or greater * PHP version 5.6.0 or greater * MySQL version 5.0 or greater == Frequently asked questions == = Are multiple discounts possible ? = Yes. It is possible to create multiple discounts. = Are the discounts visible in Product page ? = Yes. The discount will be displayed in Product page, product details page, cart striking out the Original price. = Is it possible to exclude products on SALE? = Yes. You can exclude the products on sale from the discount rules. = Can I offer a discount based on the purchase history of the customer? = Yes. You can offer a discount based on the purchase history, total amount spent by the customer in his previous orders or based on the total number of orders placed by a customer. = Is it possible to provide discount for wholesale customers? = Yes. The plugin has a user role specific discount rule. You can create a discount for specific user roles like Wholesale customers. = How to provide a bulk discount in WooCommerce? = Simple. Just install the plugin and create a product price based discount rule. You can configure bulk purchase quantity ranges with discount percentages. Example: 3 to 5 quantities - 10%, 6 to 10 quantities - 20% = Will the discount be showed in the invoice ? = Yes. The discount will be displayed separately in the invoice. = Will the discount be applied to Product Variants ? = Yes. The discount will be applied to Product Variants as well. If you have two variants for an Iphone such as 64GB and 128GB, the discount will be applicable for both the variants. = Is it possible to apply discount based on User roles ? = Yes. You can apply discount for different user levels. Eg: Premium customers get 20% discount while first time customers gets 10% discount. = How to set Bulk Discount ? = You can specify the Maximum and minimum quantity for the discount to be applied. Eg: * Quantity 1 - 5 = $10 Discount or 10% discount * Quantity 5 - 10 = $15 Discount or 15% discount = Can I set a global discount for all products ? = Yes. You can set discount for all products at global level. = Is it possible to provide Bogo deals ? = Yes. You can provide buy 1 get 1 offers in your store. = If I have one or more rules for the same product, which will be applied ? = In that case, the rule with the higher priority will be applied. = Are there any limit for the number of rules ? = With free version and the PRO version, there is absolutely no limits. You can create unlimited discount rules for your store. = What happens after my PRO license expires ? = You can continue using Discount Rules for WooCommerce plugin in your site. However you won’t be able to receive the Updates and priority support. = What is your refund policy? = We do have a 14-day money back guarantee. If our plugin doesn’t meet your requirements, we can issue a full refund. No compromise in that. = Can I set discount based on Billing Country and City ? = Yes. It is possible to set discount rule based on the Customer city. Eg:Customers from Texas gets 15% discount. The discount will be applied at the cart level. = How to setup BOGO (Buy ONE get ONE) deals ? = Navigate to WooCommerce -> Woo Discount Rules -> Add New Rule. Choose the discount type as Buy X get X. Then choose the filter and quantity ranges. Note : Enable recursive checkbox if the discounts should be applied in sequential ranges. == Screenshots == 1. Price rules and Cart rules 2. Creating a price rule 3. Example Promotion Offers created using Discount rules 4. Discounted price is applied in the Cart 5. Creating a Buy X get Y rule 6. Free product auto added in cart == Credits == * Dutch Translation - [@mvdburg1971](https://profiles.wordpress.org/mvdburg1971) - Michael van der Burg == Changelog == = 2.6.1 - 08/05/23 = * Improvement: Event: advanced_woo_discount_rules_matched_set_discount_range. * Add: Support collection addon(v1.2.0) on BXGY. * Fix: Tax not included on discount table for variable products. * Fix: BXGY variants not working on few cases. = 2.6.0 - 08/05/23 = * Add: Support WooCommerce High-Performance order storage feature. * Improvement: Query optimization while load coupon in backend. * Improvement: Licence URL update. * Fix: Loading range on backend - disappear when remove the first one. = 2.5.3 - 16/01/23 = * Fix: Validation fix on creating rules. * Fix: The cheapest product does not receive a discount when variant together option is enabled. * Fix: Error on variation is not an array. * Fix: Condition doesn't match when have Match any option with user role condition. * Fix: On-sale page shows incorrect data while have attribute in filters. = 2.5.2 - 09/11/22 = * Add: Support for WordPress 6.1. * Fix: SKU filter displays wrong value, when having space in SKU. = 2.5.1 - 02/11/22 = * Fix: Loading issue on click Add to Cart button. = 2.5.0 - 01/11/22 = * Improvement: Added applied discount info in order and order item meta _wdr_discounts. * Improvement: Set 3 for 10 fixed .1 difference on subtotal. * Improvement: Show free shipping rule reports since v2.5.0. * Add: Show total order count and sales on report section. * Fix: Disable coupon option doesn't working with free shipping. * Fix: Applied message is not displaying in cart for free shipping. * Fix: Limit option is not working with Free shipping. * Fix: Warning on PHP 8. = 2.4.5 - 27/09/22 = * Improvement: Backend field validation. * Improvement: Condition and filter matches on any operation. * Fix: Applying discount more than discount quantity on set and BXGY. * Fix: Quantity issue on set discount while manual request. = 2.4.4 - 09/08/22 = * Fix: Onsale page query improvement for on-sale filter. * Fix: BXGY cheapest variants together strikeout issue fix. * Fix: Wrong price on subtotal promotion message while set including tax. = 2.4.3 - 28/06/22 = * Improvement: Event: advanced_woo_discount_rules_get_price_of_cart_item_on_find_cheapest_item = 2.4.2 - 21/06/22 = * Feature: Option to schedule sale page product rebuild on daily once. * Improvement: Event: advanced_woo_discount_rules_refresh_shipping_options_on_order_review * Fix: Cart coupon Condition not working when cart is empty. * Fix: Strikeout not displayed for BXGY cheapest individual product on product page and cross sell block. * Fix: BXGY discount applies before matches. * Fix: esc_attr() applied to prevent XSS issues. = 2.4.1 - 17/05/22 = * Improvement: Removed backslash while using single quote on promotion message. * Improvement: Load rule id on discount table info for BXGY and Set discount. = 2.4.0 - 06/04/22 = * Fix: Multiple messages on having BXGY cheapest rules. = 2.3.13 - 08/02/22 = * Feature - Apply coupon through URL option. * Improvement - Compatible option for Multi-Currency by WPML. * Improvement - Compatible for WooCommerce Multi-Currency by TIV.NET. * Improvement - Compatible for WooCommerce Price Based on Country by Oscar Gare. * Improvement - Quantity calculation for Cart Item Product Combination Condition on having multiple product with same Id. * Improvement - PHP 8 compatible. * Fix - BXGY categories are not displaying in report. * Fix - Not in list filter for variant sku also consider for discount. = 2.3.12 - 13/01/22 = * Improvement - WooCommerce 6.1 compatible = 2.3.11 - 16/12/21 = * Improvement - Disable free shipping rule in statistics. * Improvement - Event: advanced_woo_discount_rules_admin_rule_notices. * Improvement - Warning on product doesn't exists / out of stock for BXGY. * Fix - Purchase history quantities for Specific Product condition doesn't considered variants. * Fix - Not displaying variant name when having more than 3 combination of attributes. * Fix - Auto add next available variant when a variant in not purchasable. = 2.3.10 - 15/11/21 = * Improvement - Event advanced_woo_discount_rules_calculate_cheapest_discount. * Improvement - Event advanced_woo_discount_rules_use_sale_badge_percentage_customization. * Improvement - Revert First order condition doesn't worked for mix guest and login * Fix - Not displaying variation title in BXGY auto add select on cart. * Fix - BXGY doesn't auto remove on checkout on rule failed. * Fix - Handle BXGY sale badge on user group condition. = 2.3.9 - 21/10/21 = * Improvement - Taxonomy cache improvement. * Improvement - Load the awdr_pro.js in footer. * Fix - First order condition doesn't worked for mix guest and login * Fix - Handle auto add products based on language while having wpml. * Fix - Product not auto added when previously added is not in stock. * Fix - Buy X get X not applies while having less quantity. * Fix - Error while auto add (on product doesn't exists). * Fix - Free shipping with other exclusive rule. = 2.3.8 - 22/07/21 = * Improvement - Event advanced_woo_discount_rules_select_set_discount_type * Improvement - Event advanced_woo_discount_rules_bundle_set_recursive_fixed_set_value. * Fix - Wrong discount quantity on some cases in cart. * Fix - Error while auto add (on product doesn't exists). = 2.3.7 - 30/04/21 = * Improvement - Moved advance option tab to settings. = 2.3.6 - 29/04/21 = * Feature - Recursive option for set discounts. * Improvement - Compatible with PHP 8. * Improvement - Event: advanced_woo_discount_rules_discounts_check_bogo_return_values. = 2.3.5 - 23/03/21 = * Feature - Cross sell feature for BXGY cheapest product option. * Feature - Recipe: sample rules to add. * Improvement - SKU with product title in product select box. * Improvement - Subtotal based promotion UI improvement at backend. * Fix - Variable product with tag condition not working. * Fix - The discount bar is not displayed for variable product SKU filter. * Fix - Report for BXGY cheapest product discount (fixed discount) is not shown. = 2.3.4 - 01/02/21 = * Feature - Quantity based promotion message. * Improvement - Translation improvements. * Improvement - Event: advanced_woo_discount_rules_cart_item_key_for_buy_x_get_y_limited_discounts * Improvement - Event: advanced_woo_discount_rules_select_coupon_from_woocommerce * Improvement - Email tld condition improvement. * Fix - Buy X get Y auto add not added while variant is added in cart. * Fix - BOGO Cheapest strikeout issue. = 2.3.3 - 16/12/20 = * Fix - Set discount not applies for few cases. * Fix - Warning message for empty variants. * Fix - Customer chosen product is not updating for variant together option. * Improvement - Translation for Free shipping. * Improvement - Improved query for purchase history rules. * Improvement - Shipping state and country condition. * Improvement - Event: advanced_woo_discount_rules_set_cheapest_item_key_as_product_id_for_product_page. = 2.3.2 - 05/11/20 = * Fix - BOGO Cheapest doesn't works with WPML translation management. * Fix - BOGO Cheapest individual option not works when apply all matched rule is enabled. * Improvement - BOGO Cheapest individual option improved. * Improvement - Optimized the purchase history based first order query. = 2.3.1 - 16/10/20 = * Improvement - Added new event advanced_woo_discount_rules_user_on_condition_check. = 2.3.0 - 14/10/20 = * Fix - Wrong discount in BOGO while having apply all matched rules option. * Fix - SKU based rule not displays in onsale page. * Improvement - Cart strikeout improvements. * Improvement - Improved discount info in order meta. * Improvement - UI for RTL. = 2.2.2 - 24/09/20 = * Fix - Case sensitive issue on email based rules. * Fix - Loading multiple fields for custom taxonomy. * Improvement - BOGO auto add improved. = 2.2.1 - 08/09/20 = * Fix - Zipcode condition doesn't works on changing in checkout. = 2.2.0 - 02/09/20 = * Fix - Security checks improved. * Improvement - Disable BXGY auto add when product not in stock. = 2.1.2 - 22/08/20 = * Fix - Security fix: though a major release was made in 2.1.0 in August 13th, a few sites might had older versions. In case, they were affected due to cross-site scripting, this fix will clean up the html before displaying in the front end. = 2.1.1 - 17/08/20 = * Fix - Country and state field doesn't loads when have multiple * Fix - Warning while having BOGO rule. = 2.1.0 - 13/08/20 = * Fix - PHP 7.x warnings. * Fix - Timeout warnings while checking for update. * Improvement - Report based on cart quantities. * Improvement - Privilege and CSRF check for all requests. * Improvement - Choose free shipping as default only when applicable. = 2.0.2 - 29/07/20 = * Fix - BXGY cheapest individual option calculate wrong discounts * Improvement - Text improvement = 2.0.1 - 14/07/20 = * Fix - Warning on install pack. = 2.0.0 - 14/07/20 = * Fix - Not in list condition not working. * Improvement - Report for BOGO rules. * Improvement - Individual rule report. = 1.9.12 - 29/06/20 = * Fix - Set discount value is wrong when rule is marked as exclusive. * Fix - Warning on apply BOGO rule. = 1.9.11 - 17/06/20 = * Fix - Custom taxonomy doesn't works with conditions. * Fix - Email based rule doesn't works with User role on OR condition. * Feature - On sale include/exclude condition for Free shipping discount type. = 1.9.10 - 10/06/20 = * Fix - BXGY - with in variants was not working. * Fix - BXGY - free product quantity was wrong. * Fix - BXGY - Discount applies when Y matches. = 1.9.9 - 02/06/20 = * Improvement - BOGO free_product text hide. * Fix - Discount bar for BXGY. = 1.9.8 - 13/05/20 = * Initial release == Upgrade notice ==