=== Eren Labs – Smart Categories for WooCommerce ===
Contributors: erenlabs
Tags: woocommerce, categories, smart collections, dynamic, automation
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Auto-assign products to categories with an unlimited nested AND/OR/NOT rule engine — the WooCommerce answer to Shopify Smart Collections.

== Description ==

WooCommerce categories are manual: you add each product by hand and re-check them every time a price, stock level or attribute changes. **Smart Categories for WooCommerce** makes a category *define itself* — you describe the products with rules, and matching items are added automatically and kept in sync forever.

* **Unlimited nested rules.** Combine AND, OR and NOT in nested groups — e.g. *(Colour is Black OR Red) AND price < 50 AND on sale*.
* **35+ fields to match on.** Title, SKU, price, sale price, discount %, stock status/quantity, attributes, tags, brand, product type, ratings, all-time sales, dates, custom fields, dimensions and more.
* **Live preview.** As you build the rules you see exactly which products match, and how many, before you save.
* **Always up to date.** Membership refreshes automatically when a product, price or stock level changes, and on a daily sweep — no cron babysitting.
* **Manual assignments are respected.** Products you added to a category by hand are never removed by the engine.
* **Categories or tags.** Point a rule set at a product category or a product tag.
* **Storefront sorting & stock.** Order a smart category's shop page by best-selling, newest, price or rating, and push out-of-stock products to the end (or hide them).
* **Gutenberg block + shortcode.** Drop a smart category's products anywhere with the "Smart Category Products" block or `[scwc_products id="12" limit="12" columns="4"]`.

Works with WooCommerce global product attributes and is HPOS-compatible.

[Read the full documentation](https://erenlabs.net/smart-categories-for-woocommerce/docs/) — getting started, the rule reference (every field and operator), nested AND/OR/NOT groups, storefront sorting, the block and shortcode, performance on large catalogs, the Pro subcategory generator and troubleshooting.

= How it works =

1. **Create a category.** Pick a ready-made template (On Sale, New Arrivals, Low Stock…) or write your own rules. The live preview shows exactly which products match, and how many, before you save.
2. **Products flow in.** Matching products are assigned immediately when you create the category.
3. **It stays current.** Membership refreshes when a product, price or stock level changes, plus a daily sweep — a product that stops matching leaves on its own.
4. **Your manual picks are safe.** The plugin only ever removes memberships it created itself.

= Free vs Pro =

The complete rule engine is free, with no limits on the number of categories, rules or products.

**Free — everything you need to organise a catalog**

* Unlimited nested AND / OR / NOT rule engine
* 35+ match fields, live preview and daily auto-refresh
* Category and tag rule sets
* Storefront sorting and out-of-stock handling
* Products block + `[scwc_products]` shortcode
* Ready-made templates and in-admin Help & FAQ

**Pro — automation for growing stores**

* Auto-generate a subcategory per attribute value (Colour, Size, Brand…)
* Combine two attributes into a cross-product of subcategories
* Editable name templates, e.g. `{value1} {value2} {parent}`
* New attribute values grow new subcategories on their own, daily
* Sales-intelligence fields: units sold 7 / 30 / 90 days, revenue, velocity, days since last sale
* Trending and stale-product auto-collection templates
* Category Tree overview page
* Priority support

**Smart Categories Pro** is a separate download distributed through Freemius. Full comparison and pricing: [erenlabs.net/smart-categories-for-woocommerce](https://erenlabs.net/smart-categories-for-woocommerce/)

== Installation ==

1. Upload the `smart-categories-for-woocommerce` folder to `/wp-content/plugins/`, or install the zip via Plugins → Add New → Upload.
2. Activate the plugin.
3. Open **Smart Categories** in the admin menu and create your first smart category.

== Frequently Asked Questions ==

= How is this different from WooCommerce's built-in categories? =
Built-in categories are static lists you maintain by hand. A smart category is a rule set: any product that matches is added automatically and removed when it stops matching, so the category is always current.

= Does it move products I assigned to a category manually? =
No. The plugin tracks which memberships it created and only ever removes those. Anything you assigned by hand stays.

= Does it slow down my store? =
No. Matching runs in the background (Action Scheduler) and on product save; the storefront reads normal category relationships, so there is no query overhead for shoppers.

= Is it translatable? =
Yes. The plugin is fully internationalized (text domain `smart-categories-for-woocommerce`) and receives community translations through translate.wordpress.org — a complete Turkish translation is already prepared there.

= Can I show a smart category's products on a page? =
Yes — use the "Smart Category Products" block in the editor, or the shortcode `[scwc_products id="12" limit="12" columns="4"]` where `id` is the category ID. Products hidden from the catalog are skipped automatically.

= Where can I read more? =
The full documentation is at [erenlabs.net/smart-categories-for-woocommerce/docs](https://erenlabs.net/smart-categories-for-woocommerce/docs/) — a complete rule reference, worked examples, performance notes and troubleshooting. There is also a Help & FAQ page inside the plugin.

== Screenshots ==

1. Start in one click — ready-made collections built from your own catalog, each showing how many products are waiting.
2. Describe products with rules: combine AND, OR and NOT in unlimited nested groups, with a live preview of what matches.
3. Created and populated — matching products are assigned immediately, then kept in sync automatically.
4. Every smart category at a glance, with live product counts and one-click refresh.
5. Turn any existing product category into a smart one; products you assigned by hand are never removed.
6. A full Help & FAQ inside the admin: matching, performance, storefront and troubleshooting.
7. Free forever, Pro when you grow — the complete comparison and pricing.

== External services ==

This plugin can connect to Freemius (freemius.com) to power the optional Pro upgrade: licence activation, automatic updates for the paid version, and the checkout/upgrade screens. **Nothing is sent unless you opt in.** If you click "Allow & Continue" during the optional opt-in, non-sensitive environment data (site URL, WordPress and PHP versions, active theme/plugins and your admin email) is sent to Freemius to enable licensing and updates; if you skip it, no data is transmitted. Freemius is only contacted for these upgrade/licensing actions.

* Freemius Terms of Use: https://freemius.com/terms/
* Freemius Privacy Policy: https://freemius.com/privacy/

== Changelog ==


= 1.0.3 =
* Fixed: the Products block now carries its name, description and icon on the server too, so it is listed correctly as "Smart Category Products" everywhere (previously the WordPress.org listing derived a raw name from the block slug).
= 1.0.2 =
* Changed: every shared registry name now carries the plugin prefix to avoid collisions with other plugins — the shortcode is `[scwc_products]`, the block is `scwc/products`, the REST namespace is `scwc/v1` and the WP-CLI command is `wp scwc`.
* Note: if you used the previous shortcode or block in your content, update them to the new names.
* Fixed: the shortcode now matches the tag documented in the readme.
* Fixed: the block and shortcode no longer count products that are hidden from the catalog towards the product limit, so they always show as many products as you asked for.

= 1.0.1 =
* New: first-run Smart Start onboarding — ready-made category suggestions computed from your own catalog, with live product counts and one-click creation.
* New: a clear result screen after creating a category (products added, view-on-store link) and after generating subcategories (parent + children overview).
* New: in-admin Help & FAQ page.
* Pro: live generation preview — see every subcategory a template would create, with product counts, before generating.
* Pro: Category Tree page — all smart categories and their generated children as a collapsible tree.
* Pro: optional "Also create empty combinations" mode for pre-building a season's structure.
* Improved: clearer action hierarchy in the create flow, connection-error retry on generation, full Turkish translation refresh.

= 1.0.0 =
* First release: the unlimited nested AND/OR/NOT rule engine (35+ fields, live preview, daily auto-refresh, manual-assignment-safe), category and tag rule sets, storefront sorting & out-of-stock handling, and a products block — plus the Pro subcategory generator and sales-intelligence fields.
