WooCommerce Dynamic Pricing: BOGO, Buy X Get Y & Conditional Discounts

Offering promotions is a great way to attract customers and increase sales in your online store. Some promotion strategies that have proven effective are the Buy One Get One Free (BOGO), Buy X Get Y, and WooCommerce dynamic pricing.

Taking this into account, you may want to offer reduced prices to your users in these various circumstances:

  • Run a flash sale for a limited time.
  • Encourage your customers to buy specific products in a clearance sale.
  • Offer product bundles to big spenders.
  • Add free shipping when someone makes a bulk purchase.
  • Automatically add gift items as part of your store’s loyalty program.

Without dedicated plugins, these strategies might be utterly difficult to conduct. To save yourself from the coding hassle, you should pick a WooCommerce dynamic pricing plugin to quickly get it up and running.

In this blog post, we will discuss how to create a BOGO promotion, Buy X Get Y, and dynamic pricing rules in WooCommerce based on user conditions. And it requires no coding knowledge. Let’s dive in.

How to create “BOGO” discounts in WooCommerce

WooCommerce BOGO works on a same-product basis. Here are the typical scenarios that can be implemented with YayPricing plugin:

  • Buy one get one free.
  • Buy 5 and get one free.
  • Buy 2 and get 50% off on the third.

To create a BOGO promotion in WooCommerce, you will need to install a plugin that supports this type of promotion like YayPricing – WooCommerce Dynamic Pricing & Discounts.

It is available in a forever free plan, which you can download here: YayPricing free version.

As an all-in-one solution, YayPricing provides this rule type, which is built into the “Product Pricing” tab. Also, this type of promotion allows you to show discounted prices at the product level, not just the cart.

Here are the steps to create a Buy One Get One Free promotion:

1. Install YayPricing – WooCommerce Dynamic Pricing & Discounts plugin.

You can do this by going to your WordPress dashboard, clicking on “Plugins” on the left-hand menu, and then clicking on “Add New”. Upload YayPricing ZIP file and click on “Install Now” and then “Activate”.

On your WordPress dashboard, click on “WooCommerce” on the left-hand menu, then click on “YayPricing”.

2. Create a new BOGO rule

Once activated, just open YayPricing dashboard, and then open “Product Pricing”. Click on “Add new rule”.

Let’s add the rule to offer a free product when a customer purchases a specific product or quantity.

Then, configure this rule so that a free item will be gifted whenever a base product is bought.

If “Repeat” is ticked, the gift product will be applied every time the rule is met, while “Not repeating” will only give this discount once.

3. Select eligible products

In this step, you will specify the products or categories that are eligible for the promotion by selecting them from the dropdown menus.

In case you filter products by categories, click on “View selected products” to double check all the products that are currently assigned to the pricing rule.

4. Add restrictions for the promotion

Set up any additional conditions or restrictions for the promotion. Under the “Conditions” tab, you can specify additional conditions that need to be met before the promotion is applied.

For example, you can set a minimum or maximum cart subtotal amount, limit the promotion to specific customer groups or exclude certain products from the promotion.

5. Complete setup

Save the rule and test it out on your store. Click on “View selected products” to see the full list of eligible products. Then you can choose one to start testing how the WooCommerce discount plugin works.

As per the discount set for “Buy 1 Get 1 Free when you buy more than $10”, a phone case item will be automatically added to cart when the customer buys a phone case AND their cart value exceeds $10.

Isn’t that great? Now, let’s move on to the steps to creating a WooCommerce Buy X Get Y promotion.

How to create WooCommerce “Buy X Get Y” rules

A Buy X Get Y promotion is an offer that allows customers to get a free product when they purchase a certain product. For example, if you sell shoes, you can offer a free pair of socks when a customer buys a pair of shoes.

To bring this idea to life, you can use a pricing template called “Buy X Get Y”.

1. Add purchase rules

Let’s start adding your requirements by specifying the number of products the customer needs to purchase (X) to qualify for the promotion and the number of free products they will receive (Y).

2. Add conditions for the automatic discount

Additionally, you can enable restrictions for the automatic discount. Under the “Conditions” tab, you can specify additional conditions that need to be met before the automatic discount is applied.

For example, you can limit the discount to specific customer groups or exclude certain products from the discount.

3. Insert promotion description of Buy X Get Y to product page

Under Settings tab, you will see a variety of enhancements for publishing the promotional campaign to the website front-end.

This helps you add text, links, and custom images to WooCommerce product page.

4. Complete setup of Buy X Get Y

Once you’re happy with all of the display options, click Save and enable the pricing rule! Then, simply visit an assigned product and test the function on your product page!

Set Dynamic Pricing & Flexible Shipping Based on User Conditions

Along with BOGO, Buy X Get Y, or bulk pricing, you can make them combinable with other discounts. To combine multiple discount layers, you can set up these campaigns:

  • Product discounts (buy X get Y, amount off discounts) with a free shipping discount.
  • Product discounts with flexible shipping fees based on shipping regions.
  • Cart discounts with a free shipping discount.

In the screenshot below, you can see how to enforce free shipping when the cart subtotal value meets your conditions.

To make use of advanced dynamic pricing for WooCommerce, you can look for further ideas to enable WooCommerce dynamic pricing based on and applied to specific user conditions. In YayPricing, these user conditions are built in:

  • Is logged in user or not
  • Customer role
  • Manually picked customers
  • Customer order count


Add a cap to the discount amount

If the discount is a percentage off of the price of products, then it is important that you add a “maximum value” for the discount amount. This helps you set the highest possible amount the customer can get for a single discount without compromising your profit margin.

Enable max use limit

If you are offering free products in BOGO promotions, then it is important that you maintain adequate inventory. To prevent the inventory of free products from dropping to zero, you can set a max limit for the times of usage. Once this max use count is reached, your campaign will be considered completed.

Give exclusive offers only for high-value customers

Imagine you have a customer who has purchased more than 10 orders at your online store. You would want to offer them something super special as a thank-you. Fortunately, this WooCommerce Dynamic Pricing & Discounts plugin can help you set it up quickly. Under “Conditions” tab, you can specify the number of orders a customer has placed in order to get the discount.

Use shortcode to display products on sale

YayPricing allows you to use shortcode to output the list of assigned products. For example, you can display the whole list of products on sale in your Black Friday campaign.

Simply publish the pricing rule, where it can be “Running” or “Scheduled”, and hover on its shortcode.

Click to copy it and paste it onto your WordPress page/post.

When published, it will generate your Black Friday campaign’s sales products.

Check out YayPricing demo.


For your reference, here are a few spots where you may see the changes regarding WooCommerce dynamic pricing:

  • Product page: You will see the custom sales badge attached to the product’s big featured image.
  • Product description: If set properly, you will see the promotion message displaying right above the product price.
  • Cart page: If you enable the YayPricing effects on cart, you can test it by hovering on cart line item to view the tooltip, checking the adjusted product price, and calculating the discount based on your quantity.
  • Cart messages: Based on the conditions that need to be met before the promotion is applied, you can dynamically display these messages to the customer. For instance, if the user is currently logged out and therefore cannot get discounts, the notice will say “Please log in to get this promotion.”

Final thoughts

Creating WooCommerce dynamic pricing campaigns is a great way to encourage customers to buy more products and increase sales.

By following the steps outlined in this blog post, you can easily create a BOGO deal, Buy X Get Y, or advanced promotional campaigns in your online store using the YayPricing – WooCommerce Dynamic Pricing & Discounts plugin. Remember to set up any additional conditions or restrictions for the promotion to ensure that it aligns with your business goals.

Overall, with all the discount campaign templates built into YayPricing, it’s pretty easy for any non-techies to create overlapping discounts and schedule them for a seasonal time span.

Rodolfo Melogli

Business Bloomer Founder

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as an independent WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

Questions? Feedback? Support? Leave your Comment Now!

If you are writing code, please wrap it between shortcodes: [php]code_here[/php]. Failure to complying with this (as well as going off topic, not writing in English, etc.) will result in comment deletion. You should expect a reply in about 2 weeks - this is a popular blog but I need to get paid work done first. Please consider joining BloomerArmada to get blog comment reply priority, ask me 1-to-1 WooCommerce questions and enjoy many more perks. Thank you :)

Your email address will not be published. Required fields are marked *