---
title: "Purchase history conditions: discounts for past buyers"
description: "Pricepep purchase history conditions: products, variations, categories, attributes and tags a customer bought, and the quantity and value purchased."
url: "https://pricepep.com/docs/purchase-history-conditions/"
updated: "2026-12-02"
category: Conditions
---

# Purchase history conditions: discounts for past buyers

Purchase history conditions look at **what the customer bought before**: which products, variations, categories, attributes or tags, how many units and for how much. You add them in the **Conditions** section of any rule.

Counts paid orders only: statuses WooCommerce treats as paid (Processing and Completed by default). Orders are found by customer account and by billing email (guest orders with the same billing email count too). Guests are recognised by the billing email once they enter it at checkout, on the classic checkout page or in the Checkout block; until then a guest has no orders. The **Purchased - ...** conditions have a period field; **Quantity purchased - ...** and **Value purchased - ...** always count all paid orders.

## Where can you use these conditions?

| Condition | Product pricing | Cart discounts | Checkout fees |
| --- | --- | --- | --- |
| Purchased - Products | Conditions | Conditions | Conditions |
| Purchased - Variations | Conditions | Conditions | Conditions |
| Purchased - Categories | Conditions | Conditions | Conditions |
| Purchased - Attributes | Conditions | Conditions | Conditions |
| Purchased - Tags | Conditions | Conditions | Conditions |
| Quantity purchased - Products | Conditions | Conditions | Conditions |
| Quantity purchased - Variations | Conditions | Conditions | Conditions |
| Quantity purchased - Categories | Conditions | Conditions | Conditions |
| Quantity purchased - Attributes | Conditions | Conditions | Conditions |
| Quantity purchased - Tags | Conditions | Conditions | Conditions |
| Value purchased - Products | Conditions | Conditions | Conditions |
| Value purchased - Variations | Conditions | Conditions | Conditions |
| Value purchased - Categories | Conditions | Conditions | Conditions |
| Value purchased - Attributes | Conditions | Conditions | Conditions |
| Value purchased - Tags | Conditions | Conditions | Conditions |

## Purchase History conditions

Purchase History conditions check what the customer bought in paid orders.

### Purchased - Products

The products the customer bought in paid orders in the chosen period.

- **Fields:** Period: all time; current day, week, month or year; last day, week, month or year; 1 to 6 days; 1 to 4 weeks; 1 to 12 months; 2 to 10 years; Products (search and select)
- **Operators:** "at least one of selected", "all of selected", "only selected", "none of selected"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Purchased - Products "all time" at least one of selected "Starter kit" to discount refills.

### Purchased - Variations

The variations the customer bought.

- **Fields:** Period: all time; current day, week, month or year; last day, week, month or year; 1 to 6 days; 1 to 4 weeks; 1 to 12 months; 2 to 10 years; Product variations
- **Operators:** "at least one of selected", "all of selected", "only selected", "none of selected"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Purchased - Variations "12 months" at least one of selected "Membership - Annual".

### Purchased - Categories

The categories of the products the customer bought.

- **Fields:** Period: all time; current day, week, month or year; last day, week, month or year; 1 to 6 days; 1 to 4 weeks; 1 to 12 months; 2 to 10 years; Product categories (child categories included)
- **Operators:** "at least one of selected", "all of selected", "only selected", "none of selected"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Purchased - Categories "current year" none of selected "Courses".

### Purchased - Attributes

The attribute terms of the products the customer bought.

- **Fields:** Period: all time; current day, week, month or year; last day, week, month or year; 1 to 6 days; 1 to 4 weeks; 1 to 12 months; 2 to 10 years; Attribute terms
- **Operators:** "at least one of selected", "all of selected", "only selected", "none of selected"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Purchased - Attributes "all time" at least one of selected "Format: Digital".

### Purchased - Tags

The tags of the products the customer bought.

- **Fields:** Period: all time; current day, week, month or year; last day, week, month or year; 1 to 6 days; 1 to 4 weeks; 1 to 12 months; 2 to 10 years; Product tags
- **Operators:** "at least one of selected", "all of selected", "only selected", "none of selected"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Purchased - Tags "3 months" at least one of selected "subscription-box".

## Purchase History - Quantity conditions

Purchase History - Quantity conditions add up how many units of the selected products the customer bought (all time).

### Quantity purchased - Products

How many units of the selected products the customer bought in paid orders (all time).

- **Fields:** Products (search and select); Number
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Quantity purchased - Products "Coffee beans" at least 10 for a loyalty price.
- No period field: all paid orders count.

### Quantity purchased - Variations

How many units of the selected variations the customer bought (all time).

- **Fields:** Product variations; Number
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Quantity purchased - Variations "Filter - Large" at least 5.

### Quantity purchased - Categories

How many units from the selected categories the customer bought (all time).

- **Fields:** Product categories (child categories included); Number
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Quantity purchased - Categories "Books" at least 20.

### Quantity purchased - Attributes

How many units with the selected attribute terms the customer bought (all time).

- **Fields:** Attribute terms; Number
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Quantity purchased - Attributes "Roast: Dark" at least 6.

### Quantity purchased - Tags

How many units with the selected tags the customer bought (all time).

- **Fields:** Product tags; Number
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Quantity purchased - Tags "refill" at least 3.

## Purchase History - Value conditions

Purchase History - Value conditions add up how much the customer spent on the selected products (all time).

### Value purchased - Products

How much the customer spent on the selected products in paid orders (all time; line subtotals).

- **Fields:** Products (search and select); Amount
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Value purchased - Products "Printer ink" at least 300.
- Includes tax when Settings > Amounts in conditions include tax is on and taxes are enabled.

### Value purchased - Variations

How much the customer spent on the selected variations (all time).

- **Fields:** Product variations; Amount
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Value purchased - Variations "Plan - Monthly" at least 100.

### Value purchased - Categories

How much the customer spent on products in the selected categories (all time).

- **Fields:** Product categories (child categories included); Amount
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Value purchased - Categories "Furniture" at least 2000 for trade prices.

### Value purchased - Attributes

How much the customer spent on products with the selected attribute terms (all time).

- **Fields:** Attribute terms; Amount
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Value purchased - Attributes "Brand: House" at least 500.

### Value purchased - Tags

How much the customer spent on products with the selected tags (all time).

- **Fields:** Product tags; Amount
- **Operators:** "at least", "more than", "not more than", "less than", "equals", "does not equal"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Value purchased - Tags "premium" at least 250.

## What do the operators mean?

| Operator | Matches when |
| --- | --- |
| at least one of selected | At least one selected item is present. |
| all of selected | Every selected item is present (others may be present too). |
| only selected | The values are exactly the selected items: every selected item is present and nothing else (for categories and attributes, child terms of a selected term count as that term). |
| none of selected | None of the selected items is present. |

| Operator | Matches when |
| --- | --- |
| at least | The value is the number or more. |
| more than | The value is more than the number. |
| not more than | The value is the number or less. |
| less than | The value is less than the number. |
| equals | The value is the number (since 2.6.0). Amounts (**Value purchased**) are compared at your store's price decimals, or at the number's own decimals when it has more, so 99.999 equals 100 in a store with 2 decimals. Quantities (**Quantity purchased**) must match exactly. |
| does not equal | The value isn't the number, compared as for equals (since 2.6.0). Like the other number operators, it doesn't match when there is no value at all. |

## Related

- [How conditions work](/docs/conditions-overview/)
- [Customer conditions](/docs/customer-conditions/)
- [Product pricing rules](/docs/product-pricing/)
- [Cart discounts](/docs/cart-discounts/)

## Frequently asked questions

### How do I discount refills for customers who bought a starter kit?

Create a product pricing rule for the refills and add Purchased - Products, all time, at least one of selected, and the starter kit.

### Do refunded or cancelled orders count?

No. Only paid orders count (Processing and Completed by default).

### Does purchase history work for guests?

Yes, once the guest enters the same billing email at checkout (classic checkout or Checkout block). Before that a guest has no purchase history, so for reliable results use these conditions with logged-in customers.

## Related articles

- [Conditions in Pricepep: how they work and combine](https://pricepep.com/docs/conditions-overview/)
- [Customer conditions: roles, users and order history](https://pricepep.com/docs/customer-conditions/)
- [Product pricing rules in WooCommerce: how they work](https://pricepep.com/docs/product-pricing/)
- [Cart discounts: automatic discounts in the WooCommerce cart](https://pricepep.com/docs/cart-discounts/)

All articles in [Conditions](https://pricepep.com/docs-category/conditions/)
