Create WooCommerce discounts based on customer purchase order history

Would you like to be able to create discounts for customers based on their previous purchase order history – for example, offer discounts to users who had spent over a certain amount in your store already? WooCommerce doesn’t give you a method to do this by default – so you need an extra plugin.
WooCommerce Dynamic Pricing and Discount Rules is a comprehensive plugin for all your discounting needs. You can use it to create all kinds of deal – like percentage or fixed discounts, bulk pricing, buy one get one free, etc – that only apply when customers have specific purchase history.
WooCommerce Dynamic Pricing and Discount Rules
Create powerful pricing incentives quickly and easily
You can set different purchase order history rules, e.g.:
- Value of the customer’s last order
- Quantity of items in the customer’s last order
- Total quantity of items purchased by the customer
- Total value of items purchased by the customer
You can also set these rules to apply from a certain date so, if you wish, you can set discounts for users who’ve purchased $1000 worth of goods since the start of the year.
Let’s take a look at how to set this up.
WooCommerce order history discounts tutorial
Setting up a discount in WooCommerce is easy with WooCommerce Dynamic Pricing and Discount Rules.
Step #1: Install and activate the Dynamic Pricing and Discount Rules plugin
Assuming you already have WooCommerce set up, you just need to purchase, install and activate Dynamic Pricing and Discount Rules.
- Download the zip file by clicking on the link on the order confirmation screen or in the welcome email
- Go to Plugins > Add New in your WordPress dashboard
- Click on the ‘Upload Plugin’ button
- Drag and drop the downloaded zip file into the ‘Choose File’ area and click ‘Install Now’
- When the plugin has uploaded, click the ‘Activate Now’ button
With the plugin installed and activated, you’re ready to start creating your purchase order history discount rules.
Step #2: Create a discount rule
Dynamic Pricing and Discount Rules has multiple options for creating discount rules. For example, you can create the following:
- A simple percentage or fixed discount
- Buy one get one free offers
- Spend X and Get Y
- Free gifts
- Bundle discounts
- Quantity-based discounts
- Bulk pricing
- Tiered pricing
- Discounts based on the value spent
- Discounts based on the value of items in the cart
- Role-based pricing
In this tutorial, we’ll just create a simple percentage discount but any of the above can be used for your order history discounts.
To create your discount rule:
- Go to WooCommerce > Fees and Discounts and click ‘Add New Rule’
- Give your rule a title – this won’t be displayed on the front end, it’s just for your own reference
- In the ‘Rule’ field, choose what type of discount you would like to offer. In this example, we’ll just choose ‘Simple’
- Enter some text in the ‘Label’ field to inform the user of the offer – e.g. ‘10% for Existing Customers’
- Choose what products the discount will apply to in the ‘Applies to’ field
- Enter the value of the discount in the ‘Amount Settings’ fields
Note that some of these settings will differ depending on the type of discount you’re setting up. Use the links to the different rule types above to find out more about each rule type.

With your rule type created, you can now define your order history rules. Let’s look at some different options.
How to create a discount for existing customers in WooCommerce
To apply a discount just for existing customers:
- In the ‘Order History’ section, select ‘Number of previous orders is’
- In the next field, choose ‘Greater than or equal to’
- Then in the ‘Value’ field, enter ‘1’
This means that the discount rule that you’ve created will only apply to users who have already placed on an order on your store.

If you like, you can also specify whether the rule should only apply to customers who have placed an order within a given timeframe or since a specific date.
How to create a discount only for new customers in WooCommerce
You can check out this tutorial on how to offer discounts for customers placing their first order.
How to create a discount for customers based on the number of orders they’ve placed
If you would like to offer discounts to customers who have only placed a few orders – or to customers who have placed multiple orders – you can do so easily:
- In the ‘Order History’ section, select ‘Number of previous orders is’
- In the next field, choose either ‘Equal to’, ‘Greater than or equal to’ or ‘Less than or equal to’
- Then in the ‘Value’ field, enter how many orders the customer needs to have placed

In the example above, the discount will only apply to users who have placed 5 or less orders.
How to create a discount for customers based on the value of their last order
Discounts based on the value of customers’ last orders are a useful way to incentivize users based on how much they spent the last time they placed an order with you. For example, you can offer a discount for users if they spent over a certain value last time.
To offer discounts to customers based on the value of their last order:
- In the ‘Order History’ section, select ‘Last order value is’
- In the next field, choose ‘Greater than or equal to’
- Then in the ‘Value’ field, enter the value of the last order, e.g. ‘500’

This means that the discount rule that you’ve created will only apply to users whose most recent order was worth over $500.
Of course, you can set it so that the discount will only apply if the customer’s last order was less than a certain value.
How to create a discount for customers whose previous order contained a certain quantity of items
You can choose to offer a discount for any customers whose most recent order contained a certain number of items. For example, you could discounts to users who purchased more or less than 10 items in their last order.
To offer discounts to customers based on the quantity of items in their last order:
- In the ‘Order History’ section, select ‘Last order quantity is’
- In the next field, choose either ‘Equal to’, ‘Greater than or equal to’ or ‘Less than or equal to’ depending on how your rule should work
- Then in the ‘Value’ field, enter the quantity of items

In this example, the discount will apply to any customers who ordered 10 or less items in their last order.
How to create a discount in WooCommerce based on a customer’s total value
A common discount method is to offer deals based on how much a customer has already spent on your site. So you might want to offer a discount to customers only if they have spent more than a certain value.
To offer discounts to customers based on the total value of their orders:
- In the ‘Order History’ section, select ‘Value of previous orders is’
- In the next field, choose ‘Equal to’, ‘Greater than or equal to’ or ‘Less than or equal to’
- Then in the ‘Value’ field, enter the value of the last order, e.g. ‘1000’

In the example above, the discount will only apply for users who have spent more than $1000 previously on the site.
As with all the rules, this can also apply to specific times – e.g. since a certain date or within a specified time frame, e.g. the last six months.
WooCommerce order history discounts – recap
That’s how to apply discounts to customers based on their previous order history. You can apply discounts based on:
- How much a customer spent in the last order
- How many items they purchased in their last order
- The total number of items purchased by the customer
- The total value of orders placed by the customer
And you can apply these by time and date as well, if you wish.
You just need the WooCommerce Dynamic Pricing and Discount Rules plugin:
WooCommerce Dynamic Pricing and Discount Rules
Create powerful pricing incentives quickly and easily
Start discounting today!