Conditions
Every Pro tab and every rule has a Conditions box. Without conditions it applies to every product and visitor; with conditions, only where they match.
The Conditions box
- Apply when: all conditions match (default) or any condition matches.
- Add condition adds a row with three parts: the condition, an operator and the values. The × button removes a row.
- With no rows: "No conditions: applies to every product and visitor."
- Up to 20 conditions per tab or rule. A row without values is dropped when you save (except On sale and Visitor is logged in, which need none).
Condition types
| Condition | Operators | Values |
|---|---|---|
| Product category | is any of · is none of | Choose one or more categories |
| Product tag | is any of · is none of | Choose one or more tags |
| Specific products | is any of · is none of | Product IDs, separated by commas ("e.g. 12, 34"). |
| Product type | is any of · is none of | Simple, grouped, external/affiliate, variable… |
| Stock status | is any of · is none of | In stock, Out of stock, On backorder |
| On sale | yes · no | - |
| Price | greater than · at least · less than · at most | One number, the product's current price |
| Visitor role | is any of · is none of | Guest (not logged in) and every user role on your site |
| Visitor is logged in | yes · no | - |
Hold Ctrl (or ⌘ on a Mac) to pick several categories, tags, types, statuses or roles. The category and tag lists show up to 500 terms each.
Examples
- Only for dresses that are on sale: all conditions match · Product category is any of Dresses · On sale yes.
- Sold out or a gift box: any condition matches · Stock status is any of Out of stock · Product category is any of Gift boxes.
- Guests only: Visitor role is any of Guest (not logged in), or Visitor is logged in no.
- Expensive products: Price at least 500.
Good to know
- Conditions are checked on the server for each product page. Role and login conditions give different pages to different visitors; see caching.
- With WPML or Polylang, product, category and tag conditions also match the translated items.
- Developers can add their own condition types with
siteryn_ptm_pro_condition_typesandsiteryn_ptm_pro_condition_fact. See Hooks.