=== YayPricing - WooCommerce Dynamic Pricing & Discounts ===
Contributors: YayCommerce
Donate link: https://yaycommerce.com/yaypricing-woocommerce-dynamic-pricing-and-discounts/
Tags: dynamic pricing, discounts, cart fee, buy one get one, coupon
Requires at least: 3.0
Tested up to: 6.8
Stable tag: 3.5.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Your all-in-one WooCommerce dynamic pricing toolkit. From Buy X Get Y to tiered and bundle discounts, create powerful rules that boost sales with ease.

== Description ==

YayPricing is your all-in-one solution for creating **smart pricing and discount campaigns in WooCommerce**. No matter if it’s flash sales, BOGO deals, or tiered discounts, YayPricing makes it easy to set up powerful promotions based on flexible conditions.

💪 Master WooCommerce Dynamic Pricing in Just 4 Easy Steps:

- Select a pricing type and define its discount rules.
- Apply the pricing rules to a product or a category of products.
- Add user role or cart conditions (optional).
- Launch the new deal on your WooCommerce product page!

[**Quick Demo**](https://demo.yaycommerce.com/yaypricing/) | [**YayPricing Pro**](https://yaycommerce.com/yaypricing-woocommerce-dynamic-pricing-and-discounts/) 🚀

Supported WooCommerce discount rules:

- BOGO - buy one get one free.
- Buy one get one with discount.
- Buy one get another product for free.
- Buy X Get Y rules.
- Bulk discounts.
- WooCommerce extra fees.

###⚡️ FEATURES

**Multiple Discount Types**
You can have different discount methods such as fixed discount, discount by percentage, or fixed price.

**Customize Discount Messages** 
Display discounts and pricing table in different styles on product page.

**Scheduled Pricing and Discounts**
Easily schedule discounts to run during a set timeframe for a specific marketing campaign.

**Drag and Drop Interface**
Move a particular pricing rule to prioritize it. Or you can also pick a pricing scheme that fits your campaign goals.

**Dynamically Apply Rules**
You will have full control over how the rule is applied. Whether you want to offer customers the lowest pricing or maximize your profits, it takes only a click in the rule settings. 

**Multiple Conditions** 
Limit applicable discounts to product regular price, number of items, cart total, in-stock inventory, off-peak hours, etc.

###🔑 COMMON USE CASES

**Welcome new customer**
- [First order discount](https://yaycommerce.com/create-woocommerce-first-order-discount/): Offer a 30% discount only for first-time customers.
- Subscribe and make the first purchase to get a swag bag.

**Clearance sale**
- Buy at least 3 t-shirts to get $5 discount for each.
- WooCommerce change product price based on quantity.

**Buy X get Y**
- Buy a t-shirt, get a matching cap for free.
- Buy a laptop, get a keyboard with 50% off discount.

**Tiered Pricing**
- Get the first item at full price and save 20% on the second item.
- First 10 items sold at $4 each, the next 10 items will be $3 each, and followed by the next 10 items at $2 each.

**Product Bundle**
- Multibuys 3 for £10 or 3 for $10.
- 25% automatic discount if the customer buys a bundle of camera, memory card, and tripod.

**Loyalty rewards**
- Hand-picked VIP customers get a 30% discount.
- [Offer free gifts in WooCommerce](https://yaycommerce.com/how-to-offer-free-gifts-in-woocommerce/) for frequent buyers. 

**Limited time discounts**
- 100 first orders with specified products during Black Friday campaign get 50% discount.
- 10% discount for software products and services on Cyber Monday.

**Flexible discounts**
- Add any 3 products to cart and get the cheapest item for free.
- $10 off if paid in USD, €20 off if paid in EUR, etc.

Happy Discount-ing! 💛 

**Find out more:**
✅ Approved by WooCommerce: [Dynamic Pricing, Cart Discounts & Checkout Rules for WooCommerce](http://woocommerce.com/products/dynamic-pricing-discounts/)

🔍 Want to see YayCommerce in action? [View all YayCommerce plugin demos](https://demo.yaycommerce.com/) and explore the full suite of features.

== Installation ==
1. Download the plugin from wordpress.org
2. From your WordPress admin dashboard, go to **Plugins** > **Add New**, and upload the yaypricing.zip file
3. Install and activate it
4. After activating, you don't need to fill in any license, just go to **WooCommerce** > **YayPricing** to create and manage multiple pricing rules, discounts, and custom fees

== Frequently Asked Questions ==

= Can I set bulk discounts on variable products and their variations? =
Yes, YayPricing allows you to create bulk discounts for variable products. The pricing table can be displayed on product page and the prices will be updated based on the product variation selected.

= Can I offer a different discount for different customers and roles? =
Yes, you can add and combine user conditions to create advanced pricing rules. For example, apply an automatic discount only for logged in users, or offer a customer loyalty discount only for those customers who have placed at least 10 orders on your WooCommerce store. 

= How to create a free shipping discount based on a certain monetary value of cart? =
This is one of the premium-only features of YayPricing Pro. Consider upgrading to [WooCommerce Dynamic Pricing & Discounts Pro](https://yaycommerce.com/yaypricing-woocommerce-dynamic-pricing-and-discounts/) to unlock these features.

= I have issues with Woo discounts. How can I get support? =
Please [create a topic](https://wordpress.org/support/plugin/yaypricing/) or [contact us](https://yaycommerce.com/support/) to get help. To quickly get the answers, please attach screenshots of currently active WooCommerce plugins on your website. Maybe it is a third-party conflict.

= Is YayPricing GDPR-compliant? =
A big yes! YayPricing is compliant with GDPR. It doesn't collect your WooCommerce store data or any sensitive information. 

== Screenshots ==
1. Discount rules and dynamic pricing for WooCommerce
2. Set up WooCommerce bulk discounts with YayPricing 
3. Customize pricing table of WooCommerce bulk pricing and quantity discounts
4. Display quantity based pricing table for WooCommerce quantity discounts
5. Set up buy one get one free and other WooCommerce BOGO deals
6. Gift item of "Buy one get one free" promotion automatically added to cart page

== Changelog ==

= Jun 17, 2025 - Version 3.5.3 =
- New: es_ES translation
- New: Timer translations
- New: Cart item price criterion for Products filter
- New: Sale badge text setting
- New: Condition for purchased categories
- New: Sub-filter to filter product price criterion from the given list
- Updated: Compatibility with WooCommerce 9.9+
- Updated: Buy X Get Y add products with publish status only
- Updated: Frontend UI
- Fixed: Duplicate discount table
- Fixed: Cannot view more customer search (Admin conditions)
- Fixed: Video not showing in offer description
- Fixed: Saved amount only shows when higher than zero
- Fixed: Recurring schedule with timezone not working properly
- Fixed: Encouraged notice display when has negative discount amount
- Fixed: Missing comparison for User creation time condition
- Fixed: Other minor issues

= Mar 22, 2025 - Version 3.5.2.2 =
- Added: Hooks for rendering pricing table in some themes

= Mar 9, 2025 - Version 3.5.2.1 =
- Fixed: Critical error of add to cart button when choosing variation

= Mar 7, 2025 - Version 3.5.2 =
- Added: User can change Pricing table columns position
- Added: Pricing table row now is highlighted when match quantity
- Added: Shortcode to display Pricing table (PRO)
- Added: Combine condition to check Items that purchased in specific times (PRO)
- Added: Shipping methods condition
- Added: Shipping classes condition
- Added: Shipping class product filter
- Added: Product has subscription filter
- Updated: Pricing table hooks to match with WooCommerce
- Updated: Remove on sale products cache when data saved in Admin
- Updated: Pricing table show when matching variation is selected
- Fixed: Checking products stock filter not correctly
- Fixed: Not in list not work correctly
- Fixed: Admin Issue with pricing type when changing rule type
- Fixed: Product filter selections turn into IDs after reloading page (When facing this issue, user needs to add filter items again to make it work)

= Dec 30, 2024 - Version 3.5.1 =
- Fixed: Buy x get y with discounted item

= Dec 27, 2024 - Version 3.5 =
- Added: Product filter by product attribute
- Added: Product filter by WC product on sale status
- Added: Custom hook to display offer description (yaydp_product_offer_description)
- Added: Integrate with Iconic Attribute Swatches plugin
- Added: Integrate with Cartflows Order Bumps (display bump discounted price correctly)
- Added: Integrate with Google Tag Manager plugin
- Added: Sync with WC coupon individual use only
- Added: Bundle discount affected items
- Added: Condition by billing region
- Added: Condition by account create time
- Updated: Work with WC coupon exclude sale items per-cart
- Updated: Work with WC coupon exclude sale items per-product
- Updated: Handle litespeed cache when Rule schedule is start/over
- Fixed: Free item price not display correctly with  Role Based Pricing plugin

= Nov 3, 2024 - Version 3.4.1 =
- Fixed: Warning of save amount block

= Nov 1, 2024 - Version 3.4 =
- Added: All on-sale shortcode (display on sale WC and on sale YayPricing) yaydp-all-on-sale-products
- Added: Apply rule only to first matching products ( setting on product pricing rule )
- Added: Apply discount to non-discount product ( Disable product pricing rules when the product is discounted by other rule )
- Added: Save amount block
- Added: Randomize free items in specific period
- Added: Setting allow enable calculating tax in checkout fee
- Added: Integrate with WooCommerce Composite Products Plugin
- Added: Integrate with WPClever Product Bundles Plugin
- Updated: Admin layout
- Fixed: Admin HTML editor cannot enter link with internal open link
- Fixed: Admin prevent texts selected when sorting rule
- Fixed: Elementor cart automatically open

= Sep 15, 2024 - Version 3.3 =
- Added: Product Fee rule
- Updated: Improve WPML support (don’t need to add product/category/tag for each language anymore)
- Updated: Remove manually admin order discount
- Fixed: Cannot update cart when adjust quantity to 0
- Fixed: rule status and countdown timer when using recurring schedule
- Fixed: sale tag/ discounted price when using formula

= Sep 9, 2024 - Version 3.2 =
- Added: Formula for Product Bundle rule, Simple Adjustment rule
- Added: Apply discount for order created manually in admin
- Added: Previous order in specific days condition
- Added: Settings to apply shipping discount to shipping package instead of add a discount line in Checkout page
- Added: Count all together for Bulk Pricing
- Improved: Display pricing table conditionally based on user conditions
- Improved: Integrate with Nexi Checkout
- Improved: Integrate with Advanced Product Fields plugin
- Fixed: Discounted price not show in product page
- Fixed: Warning when using schedule recurring
- Fixed: Timezone when using rule schedule

= Aug 29, 2024 - Version 3.1 =
- Added: On-sale Shortcode caching
- Added: Import Tiered Pricing ranges
- Added: Show applied rules in admin order detail
- Added: new checkout rule: Custom fee based on shipping total (Pro version)
- Updated: Integrate with YITH Product Bundles plugin
- Updated: Integrate with Role And Customers Based Pricing plugin
- Fixed: Fatal error when checking cart coupons
- Improved: Pricing display for Tiered Pricing rule
- Improved: Integration with TM product extra options

= Jul 16, 2024 - Version 3.0 =
- Added: Manually change free product in buy X get Y
- Added: Tiered Pricing ( Same as Bulk pricing, but it will discount items within range )
- Added: Recurring Schedule ( allow run/not run rule in interval time )
- Added: Shipping region condition for product pricing
- Added: Import Bulk Pricing ranges
- Added: Bundle discount rule
- Added: Product filter for custom taxonomies
- Improved: Frontend performance when enable showing product price discounts
- Improved: Disable rule when WC coupon (which disable product sale ) is applied
- Integrated: B2b market user group condition
- Integrated: Condition for ACF custom taxonomy
- Integrated: Acowebs custom product addon

= Mar 25, 2024 - Version 2.5.4 =
- Improved: Remove pricing rule UI
- Updated: WC tested up to 8.7

= Mar 22, 2024 - Version 2.5.3 =
- Fixed: Warning in Other Plugins menu

= Feb 20, 2024 - Version 2.5.2 =
- Added: Integration with LiteSpeed Cache plugin
- Added: Display products saving amount option
- Added: Integration with YITH Product Add-on
- Updated: Translation
- Updated: Change offer description position -> to before add to cart form
- Fixed: Wp warning when get customer name

= Jan 22, 2024 - Version 2.5 =
- Fixed: Admin search product tags (cannot find parent product tag) 
- Fixed: Admin choose condition (missing previous choice labels)

= Nov 25, 2023 - Version 2.4.9.2 =
- Updated: Translations
- Fixed: Cart discount (Change woocommerce_before_calculate_totals hook priority from 101 to 100)
- Fixed: Remove Licenses tab (Free version)

= Nov 18, 2023 - Version 2.4.9.1 =
- Fixed: Displaying product and category names instead of IDs

= Oct 31, 2023 - Version 2.4.9 =
- Added: Translations
- Updated: Remove fixed style of sale badge
- Fixed: WP org "not properly prepared for localization" warning
- Fixed: Product pricing discount when display including tax price
- Fixed: Name of product/category in filter disappear when reloading page (admin) --> tackle WP org support topic

= Oct 24, 2023 - Verison 2.4.8.2 =
- Updated: Change text domain to “yaypricing” & .pot file
- Added: .po & .mo language files

= Oct 24, 2023 - Verison 2.4.8.1 =
- Fixed: Error not properly prepared for localization

= Sep 25, 2023 - Version 2.4.8 =
- Added: YayCurrency current currency condition
- Added: Encouraged notice shortcode (Pro)
- Added: Integration with WooCommerce Google Product Feed by Ademti Software
- Fixed: Duplicating rule doesn’t reset use time to 0
- Fixed: Product price when include/exclude tax
- Fixed: Calculate wrong shipping fee when include/exclude tax
- Fixed: Update integration with CURCY new version

= Aug 25, 2023 - Version 2.4.7 =
- Added: “Applied coupon codes” condition for product pricing rules
- Updated: Purchase history conditions text and tooltip

= Aug 23, 2023 - Version 2.4.6 =
- Added: Custom class for discounted price (user re-style purpose)
- Added: Product filter by attribute
- Added: Hook for altering pricing table text
- Added: Hook for altering cart item price text
- Added: Global yaydp_cart variable
- Added: Condition for applied coupons
- Added: Condition for history bought products
- Added: Filter for altering sale tag text (for user purpose)
- Updated: Check order history except for refunded status
- Updated: CURCY plugin function
- Fixed: Pricing table does not sync when selecting variation
- Fixed: Fatal error (missing code)
- Fixed: Use time not reset when duplicating rule

= Jul 18, 2023 - Version 2.4.5 =
- Added condition: Count order from last discount
- Added condition: Cart has switch items (WooCommerce Subscriptions)
- Update: Reload cart ajax when choose payment method (apply only when have payment method conditional logic)
- Fixed: Countdown timer for product pricing (hide when disable)
- Fixed: Discounted price display
- Fixed: Compatible with YayCurrency
- Fixed: Checkout with subscription

= Jun 30, 2023 - Version 2.4.4 =
- Added: Count quantity by variations for Bulk Pricing type
- Updated: Show hierarchy of category on search result label
- Fixed: Admin settings layout in RTL mode
- Fixed: End Countdown timer not showing
- Fixed: Incorrect calculation in Cart discount

= Jun 15, 2023 - Version 2.4.3 =
- Added: Support WooCommerce HPOS

= Jun 9, 2023 - Version 2.4.2 =
- Added: Option for hiding Pricing Table
- Added: WP Filter for changing encouraged notice [action] variable
- Added: New translations in pot file
- Fixed: cart item warning
- Updated: Change woocommerce_cart_totals_fee_html hook priority
- Fixed: Compatible with WooCommerce Points And Rewards
- Fixed: Compatible with YayCurrency latest version
- Fixed: Free text displaying
- Fixed: After checkout process with cart discount and checkout fee
- Fixed: Buy x get y discount items small bug
- Removed: Coupons/fees functions

= Jun 6, 2023 - Version 2.4.1 =
- Improved: Change BOGO/Buy X Get Y discount item flow

= Jun 5, 2023 - Version 2.4 =
- Added: Count quantity by (For Buy X get Y)
- Added: Receive cheapest/ most expensive item (for Buy X get Y)
- Added: Display sale tag/ discounted price as discountable range/current tier/next tier

= May 17, 2023 - Version 2.3.1 =
- Added: YayCommerce Menu 

= May 11, 2023 - Version 2.3 =
- Added: Show offer description when match condition (PRO)
- Fixed: Fatal error when deactivate YayPricing (when having discount item in cart)
- Fixed: Verify nonce when call rest api
- Fixed: Wrong displaying tooltip variable for flat price pricing type
- Improved: Apply rule with minimum/maximum discount amount for whole cart
- Improved: Replace "Equal/Not equal" with "Greater than and equal/ Less than and equal"
- Removed: Fixed fee, percentage fee for product pricing rule

= Apr 20, 2023 - Version 2.2 =
- Added: Combined condition (PRO)
- Added: History order condition: product/category/purchased date
- Added: “Contain all” comparison type for cart item condition
- Removed: WC default flash sale when product is discounted by YayPricing
- Added: Integration with Astra theme - sticky add to cart

= Apr 12, 2023 - Version 2.1 =
- Added: Options to exclude all product pricing rules
- Added: Disable product pricing rule when product is on sale
- Added: Condition for checking cart total weight
- Improved: Upselling notice display (YayPricing Pro version) 
- Improved: Encouraged notice now doesn’t show on all pages
- Improved: Cart discount encouraged notice only show at bottom of cart page
- Improved: Checkout fee encouraged notice only show at bottom of checkout page
- Improved: Product pricing encouraged notice can show at bottom of shop page/ product page and after product short description
- Improved: Limit 1 encouraged notice shows at one time
- Changed: Upgrade URLs in YayPricing free version 
- Fixed: Conflict CSS with FileBird, CatFolders
- Fixed: Sale amount and discounted range shows incorrectly with variable products
- Fixed: Error when checking product category with variation
- Fixed: Error when saving data after creating empty conditions/filters of buy x get y rule, then switch to other types

= Apr 07, 2023 - Version 2.0 =
- Added: Tooltip image and helper text
- Compatible: with CURCY plugin
- Improveed: Validate when saving
- Improveed: UI
- Improveed: Locking feature UI
- Improved: Countdown, encouraged notice UI
- Fixed: Sale tag amount show incorrectly with maximum value
- Fixed: [discounted_price] for bulk pricing
- Removed: Condition of exclude rule (We decided to remove to keep it simple)

= Mar 30, 2023 - Version 1.9 =
- Updated: Custom fee is now not supported in free version (Shipping fee adjustment is included in free version)
- Updated: YayPricing Reports is now in WooCommerce Analytics menu
- Added: Show discounted price option
- Added: PHP requirement
- Improved: Report UI (Add column chart, highlight legend, show rule information when click legend)
- Improved: Schedule datetime picker
- Improved: Typo
- Improved: UI
- Fixed: Change checkout fee condition match type
- Fixed: Expired WC Coupon when checkout
- Fixed: schedule timezone detection
- Fixed: product pricing condition working in lite version
- Fixed: Currency symbol in rule name

= Mar 17, 2023 - Version 1.5 =
- Added: Color picker for choosing pricing table color
- Added: Use time badge in admin UI
- Added: Running rule count badge in admin UI
- Added: Variable list
- Improved UI 
- Fixed: Pricing table
- Fixed: Not saving rule to order detail
- Fixed: Report date
- Fixed: Wrong calculation for cart subtotal condition
- Fixed: PHP version syntax 

= Nov 21, 2022 - Version 1.4.1 =
- Fixed: Saving error when set up product filter

= Sep 21, 2022 - Version 1.4 =
- Added: Schedule for Fee
- Added: Shortcode tag
- Added: Filter for choosing all products
- Added: New option to show sale tag on product page and shop page
- Added: New option to use discount name to coupon code (cart discounts)
- Added: Rule status
- Added: Maximum discount feature
- Improved: Change description shortcode name
- Improved: Change wp editor to ckeditor
- Improved: UI and text
- Improved: WooCommerce feedback
- Improved: Change “use name as code” to “use generated Id as code”
- Improved: Maximum use feature
- Fixed: Bug cannot add product pricing shortcode
- Fixed: Bug BOGO and Buy X Get Y not showing tooltip
- Fixed: Rule is not applied for child category in product filters.
- Fixed: Bugs

= Jul 29, 2022 - Version 1.3 =
- Added: Filter product by custom taxonomy for product (support Custom Post Type UI plugin)
- Added: Fees handler feature
- Added: Condition about checking shipping total and checking customer order count
- Added: Limit amount of reaching rule
- Added: New condition shipping regions (apply cart discount and fees)
- Improved: Add question mark for hover to show tooltip and re-style tooltip
- Improved: dmin UI
- Fixed: Handle multi products in filter in BOGO and Buy X Get Y type
- Fixed: Handle out of stock
- Fixed: Pricing table is always display even though turn off show pricing table setting
- Fixed: Apply first, smallest, highest price rule of product pricing

= Jun 28, 2022 - Version 1.2 =
- Updated: provide shortcodes ( discount_amount, discounted_price, discount_value ) for offer description
- Updated: provide edit encourage notice text and count down text
- Fixed: issue offer description and pricing table always show without check role condition.
- Fixed: UI issues.
- Fixed: Fatal error when uploading a newer version

= Jun 2, 2022 - Version 1.1 =
- Added: Banner and text for BOGO and Buy X Get Y discount rules
- Added: Quantity pricing table design
- Improved: Offer description on product page
- Fixed: Minor bugs

= Feb 28, 2022 - Version 1.0 =
- Initial releas