Skip to main content

WooCommerce Product Badge Conditions

Overview

The Products & Conditions tab is what makes badges automatic. Instead of tagging products one by one, you write rules — "which products" and "which visitors" — and the plugin applies the badge everywhere those rules match. Set it once; it maintains itself as your catalog changes.

Use WooCommerce product badge conditions and WooCommerce badge rules to target WooCommerce badges by product, category, sale status, customer context, or user role product badges requirements. This is especially useful for WooCommerce product category badges that should appear only for a defined audience.

The screenshot below shows the whole flow in context: give the badge a Name, open the Products & Conditions tab, add a product rule (here Recently Added → 14 days for a "NEW" badge), and Save.

The badge editor with the Products & Conditions tab and a Recently Added rule

How it works

You want a "Members Only" badge, but only on Gaming/Game Controllers, and only for logged-in Wholesale customers. You add a product rule (Categories → Gaming/Game Controllers) and a condition (User Role → Wholesale). Now the badge appears exactly where and for whom you intended — and never for regular visitors.

Free vs Pro

Core product rules (products, categories, tags, on-sale, stock status) are in the Free version. Advanced product rules (quantity, price ranges, best-seller, featured, custom attributes) and all visitor conditions (login, roles, geolocation, money spent) are Pro.

How rules combine

Rules are grouped with AND and OR logic — the same pattern used across the plugin:

  • + And New Ruleall rules in a group must match.
  • + OR New Groupany group can match.

Example: (Category = Gaming/Game Controllers AND Is On Sale) OR (Tag = Clearance).

Product rules

Add one or more rules to decide which products show the badge. Open the first dropdown to choose a rule type:

Product rule type dropdown listing every rule type, with a Categories rule for Gaming/Game Controllers

RuleMatches products byTypical use
All ProductsEvery product in the store.A storewide seasonal badge.
ProductsA hand-picked list (Included or Excluded).Feature or exclude specific items.
Stock statusIn stock / out of stock / on backorder."Sold Out" or "Back in Stock" labels.
Is on saleProducts currently on sale (Yes / No).Auto "Sale" badge on discounted items.
CategoriesProduct categories (Included or Excluded).Category-wide promotions.
TagsProduct tags (Included or Excluded).Cross-category campaigns (e.g. "clearance").
BrandsProduct brands (Included or Excluded).Brand-specific promotions.
Shipping ClassProducts assigned to a shipping class.Apply a badge to products with a delivery or handling class.
Discount rulesProducts matched by your Discount Rules & Dynamic Pricing plugin rules.Badge everything currently discounted by a pricing rule.
Recently AddedAdded within the last N days / weeks / months."New" badge on fresh arrivals.
Featured ProductsProducts marked featured (Yes / No).Highlight your curated picks.
Product AttributesA WooCommerce attribute (Included or Excluded).Target by color, size, material, etc.
Product Custom AttributesA specific custom attribute name/value.Target by any custom attribute.
Best SellerTop-selling products in a period — Today / This Week / This Month / Last month / This Year — showing the top X by sales."Best Seller" trust badge.
QuantityStock quantity, via a numeric operator.Low-stock urgency (e.g. quantity ≤ 5).
Price / Sale Price / Regular PriceA numeric price comparison.Badge products under/over a price.
Operators & Include/Exclude
  • Numeric operators (Quantity & Price rules): Less than, Less equal to, Greater than, Greater equal to, Equal to, Not equal to.
  • The selector is Included or Excluded for Products, Categories, Tags, Brands, and Attributes — so you can target a set, or everything except a set.

Visitor conditions

Under Conditions, restrict the badge to certain visitors or contexts. Open the condition dropdown to pick a type:

Visitor condition dropdown showing Is logged in, User Role, Geolocation, Money spent — with User Role set to Wholesale

ConditionWhat it checksWhen & why to use
Is Logged InLogged in vs guest.Show member-only offers.
User RoleSpecific roles (selected / not selected).Wholesale, subscriber, VIP pricing badges.
GeolocationThe visitor's country (selected / not selected).Region-specific promotions.
Money SpentThe customer's total spend vs an amount, using a numeric operator — optionally limited to a time window (all time, or within the last N days/weeks/months/years).Reward big spenders, or win back lapsed ones.

🧪 Example configuration

The "Members Only" badge shown in the screenshots:

SettingValue
Product ruleCategories → Included → Gaming/Game Controllers
ConditionUser Role → Selected → Wholesale

What customers see

A logged-in Wholesale customer browsing Gaming/Game Controllers sees the "Members Only" badge (visible in the editor preview); a regular visitor sees nothing — same store, tailored messaging.

Best practices
  • Start broad (e.g. Is On Sale) and add conditions only if you need to narrow the audience.
  • Use Exclude on a Products rule to keep a badge off specific items (e.g. gift cards).
  • Combine with a Schedule to run targeted campaigns for a set period.

Next Steps

Frequently Asked Questions

How do I target a WooCommerce product badge to specific products?

Open the badge’s Products & Conditions tab, choose Products, select Included, and pick the products that should display the badge. Use Excluded to keep the badge off selected products.

Can WooCommerce product badges target categories or tags?

Yes. Use Categories, Tags, or Brands with the Included or Excluded selector. You can also target stock status, sale status, shipping class, attributes, price, quantity, and best sellers.

How do AND and OR rules work for product badges?

Rules in the same group use And, so every rule must match. A new Or Group creates an alternative group, so the badge shows when any complete group matches.