---
title: "Customer conditions: roles, users and order history"
description: "Pricepep customer conditions: customer, user role, capability, user meta, logged in, amount spent, order count, last order and review count."
url: "https://pricepep.com/docs/customer-conditions/"
updated: "2026-12-02"
category: Conditions
---

# Customer conditions: roles, users and order history

Customer conditions target **who is buying**: selected customers, user roles, capabilities, user meta and logged-in status, plus **what they have spent and ordered before**. You add them in the **Conditions** section of any rule.

The Customer group needs a logged-in customer: guests have no user, role, capability or user meta. 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.

## Where can you use these conditions?

| Condition | Product pricing | Cart discounts | Checkout fees |
| --- | --- | --- | --- |
| Customer | Conditions | Conditions | Conditions |
| User role | Conditions | Conditions | Conditions |
| User capability | Conditions | Conditions | Conditions |
| User meta | Conditions | Conditions | Conditions |
| Is logged in | Conditions | Conditions | Conditions |
| Spent - Total | Conditions | Conditions | Conditions |
| Spent - Average per order | Conditions | Conditions | Conditions |
| Spent - Last order | Conditions | Conditions | Conditions |
| Order count | Conditions | Conditions | Conditions |
| Last order | Conditions | Conditions | Conditions |
| Customer review count | Conditions | Conditions | Conditions |

## Customer conditions

Customer conditions check who is shopping. They need the customer to be logged in (guests have no user, role, capability or user meta).

### Customer

The logged-in customer (user account).

- **Fields:** Customers (user accounts)
- **Operators:** "in list", "not in list"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Customer in list (select accounts) for personal prices.
- Guests never match in list; not in list matches them.

### User role

The roles of the logged-in user.

- **Fields:** User roles
- **Operators:** "in list", "not in list"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** User role in list "Wholesale customer" for wholesale prices.
- Guests have no role: in list never matches them, not in list does.

### User capability

The capabilities of the logged-in user.

- **Fields:** User capabilities
- **Operators:** "in list", "not in list"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** User capability in list "member_gold" set by a membership plugin.
- Includes capabilities from the Groups plugin when it is active.
- Developers can add capabilities to the list (rp_wcdpd_all_capabilities).

### User meta

A user meta field of the logged-in customer: enter the meta key and the value.

- **Fields:** Key (placeholder "data key"); Value (placeholder "value"; hidden for is empty, is not empty, is checked and is not checked)
- **Operators:** "is empty", "is not empty", "contains", "does not contain", "begins with", "ends with", "equals", "does not equal", "less than", "less or equal to", "more than", "more or equal to", "is checked", "is not checked"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** User meta "loyalty_tier" equals "gold". Step by step: [discounts based on a custom user field](/docs/can-i-give-discounts-based-on-a-custom-user-field/).
- WooCommerce customer data such as billing_country can be used by its meta key; paying_customer, _order_count and _money_spent are read through WooCommerce.
- Guests have no user meta: only is empty, does not contain, does not equal and is not checked match them.

### Is logged in

Whether the customer is logged in.

- **Fields:** none (choose yes or no)
- **Operators:** "yes", "no"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Is logged in yes for a members-only price.

## Customer - Value conditions

Customer - Value conditions use the customer's paid orders and reviews.

### Spent - Total

The total of the customer's 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; 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:** Spent - Total "all time" at least 1000 for a VIP discount.
- Uses order totals (shipping and tax included).

### Spent - Average per order

The average total of the customer's 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; 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:** Spent - Average per order "12 months" at least 150.

### Spent - Last order

The total of the customer's most recent paid order.

- **Fields:** 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:** Spent - Last order at least 200.
- No period field.

### Order count

The number of the customer's 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; 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:** Order count "all time" less than 1 for a first order discount.
- Guests are recognised only once they enter their billing email at checkout (classic checkout or Checkout block); before that a guest counts as new, so a first order discount can show in the cart and disappear at checkout.

### Last order

When the customer's most recent paid order was placed.

- **Fields:** Period: current day, week, month or year; 1 to 6 days; 1 to 4 weeks; 1 to 12 months; 2 to 10 years
- **Operators:** "within past", "earlier than"
- **Available in:** Product pricing rules (Conditions); Cart discounts (Conditions); Checkout fees (Conditions)
- **Example:** Last order earlier than "6 months" to win back customers who have not ordered for 6 months.
- earlier than also matches customers with no paid order.

### Customer review count

The number of product reviews the customer has written (by account, plus guest reviews with the same billing email).

- **Fields:** 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:** Customer review count at least 1 for a [reviewer discount](/docs/can-i-give-a-discount-to-customers-who-write-reviews/).
- Counts approved and pending reviews (comments on products), not spam or trash.

## What do the operators mean?

| Operator | Matches when |
| --- | --- |
| in list | Matches when the value is one of the selected items (for values with several items, such as the categories of a product: when at least one of them is selected). |
| not in list | Matches when none of the values is selected, including when there is no value at all (for example a guest for Customer, or a simple product for Product variation). |

| Operator | Matches when |
| --- | --- |
| is empty | No value, or an empty value. |
| is not empty | A non-empty value. |
| contains | The value contains the text (case-sensitive). |
| does not contain | The value does not contain the text (also matches when there is no value). |
| begins with | The value begins with the text. |
| ends with | The value ends with the text. |
| equals | The value is exactly the text. |
| does not equal | The value is not the text (also matches when there is no value). |
| less than | The value is a number less than the one entered. |
| less or equal to | The value is a number up to the one entered. |
| more than | The value is a number more than the one entered. |
| more or equal to | The value is a number from the one entered up. |
| is checked | The value is not empty or 0, for example yes, 1 or true. "no" counts as checked too: for yes/no fields use equals yes. |
| is not checked | Empty, 0 or no value. |

| Operator | Matches when |
| --- | --- |
| yes | The property is true. |
| no | The property is false. |

| 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 (**Spent - Total**, **Spent - Average per order**, **Spent - Last order**) are compared at your store's price decimals, or at the number's own decimals when it has more, so an average of 49.996 equals 50 in a store with 2 decimals. Counts (**Order count**, **Customer review count**) 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. |

| Operator | Matches when |
| --- | --- |
| within past | The last paid order was placed within the period. |
| earlier than | The last paid order was placed before the period, or the customer has no paid order. |

## Related

- [How conditions work](/docs/conditions-overview/)
- [Purchase history conditions](/docs/purchase-history-conditions/)
- [Product pricing rules](/docs/product-pricing/)
- [Cart discounts](/docs/cart-discounts/)

## Frequently asked questions

### How do I set wholesale prices for a user role?

Create a product pricing rule (for example Simple adjustment, Percentage discount 20) and add the condition User role, in list, and the wholesale role.

### How do I make a first order discount?

Create a cart discount with the conditions Is logged in yes and Order count, all time, less than 1. Guests are recognised only once they enter their billing email at checkout (classic checkout or Checkout block).

### Which orders count for Spent and Order count?

Paid orders: Processing and Completed by default. Pending, on-hold, cancelled, failed and refunded orders don't count.

### Do customer conditions work for guests?

Is logged in no and the "not in list" operators match guests. Order history conditions find guest orders only by the billing email the guest enters at checkout.

## Related articles

- [Conditions in Pricepep: how they work and combine](https://pricepep.com/docs/conditions-overview/)
- [Purchase history conditions: discounts for past buyers](https://pricepep.com/docs/purchase-history-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/)
