In WooCommerce Dynamic Pricing and Discount Rules, you can trigger any discount rule based on a user’s order history. So you can create a discount for first-time customer – or discounts for customers who’ve spent over a certain value with you. You can also define time-periods – so offer discounts to users who’ve spent a certain amount since a certain date.
Configuring order history conditions
When you’ve created your rule, you can set order history conditions. In the ‘Order History’ section there are the following settings:
Rule
Choose from the following options:
- Last order value
- Last order quantity
- Number of previous orders
- Value of previous orders
Comparison
Choose from the following options:
- Equal to
- Greater than or equal to
- Less than or equal to
Value
Enter a value in this field
Example
As an example, if you want to offer a discount only for users who have spent more than $1000 with you previously, set:
Value of previous orders is > Greater than or equal to > 1000

Specifying dates for order history
By default, the plugin will count all orders placed by a user. However, you can choose only to include orders within a certain time frame – e.g. a user’s first order this year, a user’s total spend in the last six months.
Inclusion
Choose from:
- Fixed date – only orders placed since a specific date will be counted
- Specific length – only order placed within a certain time frame, e.g. the last year, will be counted
- All orders
Since date
This field will display if you have selected ‘Fixed date’ in ‘Inclusion’. Select a date. Only orders on or since that date will be counted.

Date period
This field will display if you have chosen ‘Specific length’ in the ‘Inclusion’ field. Enter a time unit, e.g. days, weeks, months, years, and a value. In the example below, only orders within the last three months will be counted.
