Getting started
Install, then build your first self-maintaining category in about a minute.
- Install the plugin. In WordPress go to Plugins → Add New, search for “Smart Categories for WooCommerce”, install and activate. WooCommerce 7.0+ and PHP 7.4+ are required.
- Open Smart Categories. A new top-level menu appears in the admin sidebar. On a fresh install you land on a welcome screen that scans your catalog and suggests ready-made collections with live product counts.
- Create your first category. Click Create on a suggestion, or Build a custom category to write your own rules. The live preview shows exactly which products match while you compose.
- Press “Create and populate”. The category is created and matching products are assigned right away. You land on a result screen showing how many products were added, with a link to view the category on your store.
How matching works
A smart category is an ordinary WooCommerce product category with a rule set attached. The plugin evaluates your rules and writes the result into normal category relationships, which is why the storefront stays fast: shoppers read plain WordPress data, exactly as if you had assigned every product by hand.
When rules run
- On product save — and whenever a price or stock level changes.
- Daily sweep — catches indirect changes, such as a sale schedule that starts at midnight or a product that has simply aged out of “New arrivals”.
- On demand — the refresh button on every category card re-scans the whole catalog immediately. Useful right after a bulk import.
What the plugin will never touch
The plugin keeps a ledger of the memberships it created and only ever removes those. Products you assigned by hand — before or after adding rules — are treated as yours and left alone. Deleting the plugin removes its own data only; your categories and product assignments stay exactly as they are.
Rule reference
Every rule is a field, an operator and a value. More than 35 fields are available; attribute fields appear automatically for every global attribute your store defines.
Product basics
| Field | Operators | Notes |
|---|---|---|
| Title, SKU, Description, Short description | contains, does not contain, is, is not, starts with, ends with, matches regex | Text matching is case-insensitive. |
| Product type | is, is not | Simple, variable, grouped, external. |
| Featured | is true / is false | The WooCommerce “featured” flag. |
| Has image | is true / is false | Handy for catalog maintenance collections. |
Price & promotions
| Field | Operators | Notes |
|---|---|---|
| Price, Regular price, Sale price | =, ≠, >, ≥, <, ≤, between | Uses the store's active price. |
| On sale | is true / is false | Respects scheduled sale dates. |
| Discount % | =, ≠, >, ≥, <, ≤, between | Computed from regular vs sale price — ideal for an “Outlet” collection (e.g. discount ≥ 40). |
Stock
| Field | Operators | Notes |
|---|---|---|
| Stock status | is, is not | In stock, out of stock, on backorder. |
| Stock quantity | =, ≠, >, ≥, <, ≤, between | Only meaningful when stock management is enabled. |
Taxonomy & attributes
| Field | Operators | Notes |
|---|---|---|
| Product category | is in, is not in, is in or under | “in or under” includes child categories. |
| Product tag | is in, is not in | |
| Brand | is in, is not in | Appears when a brand taxonomy exists (WooCommerce Brands or a compatible plugin). |
| Shipping class | is in, is not in | |
| Any global attribute (Colour, Size, Material…) | is in, is not in | One field per attribute, listed automatically. |
Ratings, dates & measurements
| Field | Operators | Notes |
|---|---|---|
| Average rating, Review count | numeric operators | |
| Total sales (all time) | numeric operators | WooCommerce's lifetime sales counter. |
| Date created, Date modified | in the last N days, before, after | “In the last 30 days” powers New Arrivals. |
| Weight, Length, Width, Height | numeric operators | |
| Custom field (meta) | text and numeric operators | Match any meta key your store or another plugin writes. |
Nested AND / OR / NOT
Rules live inside groups. A group either requires ALL of its conditions (AND) or ANY of them (OR), and any group can be negated with NOT or nested inside another group — with no depth limit.
Think of a group as parentheses in maths: everything inside is evaluated as one block.
Example — discounted shoes from two brands, excluding clearance:
ALL of:
Category is in [ Shoes ]
On sale is true
ANY of:
Brand is in [ Nike ]
Brand is in [ Adidas ]
NOT ( Tag is in [ Clearance ] )
Without the inner group, “OR” would apply to the whole rule set and the category would fill up with every Nike product in the store. The plugin shows a worked example of exactly this while you build.
Templates
Ten ready-made rule sets get you started; every one is fully editable before you create it.
| Template | Rule |
|---|---|
| New Arrivals | Created in the last 30 days |
| Best Sellers | Total sales ≥ 10 |
| On Sale | On sale is true |
| Big Discount (Outlet) | Discount ≥ 40% |
| Back in Stock | Stock status is “in stock” and recently modified |
| Low Stock | Stock quantity ≤ 5 and in stock |
| Featured | Featured is true |
| Premium (High Price) | Price ≥ a threshold you set |
| Sold Out | Stock status is “out of stock” |
| Missing Image | Has image is false (catalog maintenance) |
Existing categories & tags
You do not have to create a new category. Edit any product category (Products → Categories) and you will find the Smart Category Rules panel on its edit screen. Add rules, save, and matching products join the products already there — your manual assignments stay untouched.
The same works for product tags: point a rule set at a tag to build automatic tag-based collections.
Storefront sorting & stock
Each smart category can control how its shop page is ordered, independently of the store default:
- Product order — default (leave to the theme), best-selling, newest, price (low→high or high→low), or rating.
- Out-of-stock products — leave as is, push to the end of the list, or hide them entirely.
Block & shortcode
Show a smart category's products anywhere — a landing page, a campaign post, the homepage.
Block
In the editor, add the Smart Category Products block, then pick the category, the number of products and the order.
Shortcode
[scwc_products id="12" limit="12" columns="4" orderby="date"]
| Attribute | Default | Values |
|---|---|---|
id | — | Category ID (required). Find it in the URL when editing the category. |
limit | 12 | Maximum products to show. |
columns | 4 | 1–6. |
orderby | date | date, price, popularity, rating, title, menu_order |
Products hidden from the catalog are skipped automatically, so the grid always shows as many products as you asked for. Because membership is written to real categories, native WooCommerce blocks such as “Products by Category” work with smart categories too.
Performance
The storefront is untouched. No rule evaluation happens on your product or category pages — shoppers read plain category relationships.
Creating a category populates immediately on small and medium catalogs. Very large catalogs are processed in queued background batches (Action Scheduler) so nothing times out; the result screen tells you when population continues in the background, and counts update as the jobs finish.
Pro features PRO
The complete rule engine above is free, without limits. Pro adds scale and automation.
Automatic subcategory generator
Pick one attribute — or two — and Pro generates one smart subcategory per value or per combination. “Dresses” × Colour × Size becomes Red XL Dress, Blue M Dress, and so on: each a real, indexable category page with composed rules (in the parent and has that value), kept in sync automatically.
- Name templates — compose names from
{value1},{value2},{parent}and free text. - Live preview — see every subcategory that would be created, with its product count, before generating.
- Categories or tags — generate child categories or global tags.
- Daily growth — when a new attribute value appears (a new colour arrives), its subcategory is created on its own.
- Pre-build a season — optionally create empty combinations too; they fill themselves as matching products arrive.
Category Tree
A live map of every smart term: parents with their generated subcategories as a collapsible tree, product counts, “auto” badges and daily-sync indicators, with edit and storefront links on every row.
Sales-intelligence rules
A daily background aggregation reads your completed orders and computes per-product windows, which then become rule fields:
- Units sold in the last 7 / 30 / 90 days
- Revenue (30 days) and sales velocity (units per day)
- Days since the last sale — the basis for stale-stock cleanup collections
Two extra templates ship with them: Trending (30 days) and Stale Products. Collections built on these fields refresh themselves every day.
What happens if a Pro licence expires?
Nothing breaks. Every category and subcategory you generated keeps working and stays in sync through the free engine. You lose automatic growth of new attribute values, the sales-intelligence fields, updates and priority support — reactivating restores them.
For developers
Filters for tuning behaviour in a child theme or a small plugin:
| Filter | Default | What it does |
|---|---|---|
scwc_sync_threshold | 5000 | Published-product count above which population is queued in the background instead of run synchronously. |
scwc_evaluated_post_statuses | ['publish'] | Which post statuses the engine evaluates. |
scwc_pcre_backtrack_limit | 100000 | PCRE backtrack limit for the “matches regex” operator (ReDoS guard). |
scwc_review_min_days / scwc_review_min_products | 7 / 20 | When the review request may appear. |
scwc_hierarchy_max_children PRO | 200 | Hard cap on generated subcategories per parent. |
scwc_hierarchy_min_products PRO | 1 | Minimum matching products before a subcategory is generated. |
WP-CLI
wp scwc list # every smart category with its counts
wp scwc run <term_id> # re-evaluate one category now
wp scwc run-all # re-evaluate every smart category
The REST namespace is scwc/v1; all routes require the manage_woocommerce capability.
Troubleshooting
A product is not matching my rules
- The group requires ALL conditions while you meant ANY — the most common cause.
- The product is not published; only published products are evaluated.
- The value differs subtly — for example an attribute value versus a tag with the same name.
Open the category's edit screen and use the product check under the preview: it explains condition by condition why that product matches or fails.
The count looks stale or the category looks empty
Click the refresh button on the category card — especially after a bulk import. Then verify the rules with the live preview: an ALL group with contradictory conditions (for example “on sale is true” and “on sale is false”) matches nothing by design.
My subcategories did not grow after adding a new colour PRO
New attribute values are picked up by the daily sync. To apply them immediately, open the parent category and press Sync now. Check that Auto-add new values is still enabled, and that the combination actually has matching products (empty ones are skipped unless you ticked “Also create empty combinations”).
Deactivating or deleting the plugin
Deactivating pauses all automation — nothing is added or removed. Deleting removes the plugin's own data (rules, settings, its membership ledger) but never your categories or product assignments: each category simply becomes an ordinary WooCommerce category with its current products.
Still stuck?
Free users: the community forum on wordpress.org — please include your WordPress and WooCommerce versions and the rule set that misbehaves. Pro customers have priority support through the Contact Us entry in the plugin menu.