=== SEO AI for WooCommerce ===
Contributors: samson84
Author: SmartCategorySEO
Tags: woocommerce, seo, category description, product description, fill empty categories
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.10
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WooCommerce category & product descriptions: fill empty category pages in 1 minute (no API). Collapse long text. PRO: AI bulk descriptions & SEO.

== Description ==

**SEO AI for WooCommerce** helps store owners fix two common catalog problems:

1. **Empty category pages** that look unfinished and weak for SEO.
2. **Long descriptions** that overwhelm shoppers on category and product pages.

### Free: Fill Empty Categories

No API key. No batch jobs. One runtime template covers **every empty category** on your store.

1. Open **Fill Empty Categories** in the admin menu.
2. Pick a category and a **professional starter style** (marketplace).
3. Preview with **real catalog data** (name, stock count, prices).
4. Save — text appears on empty category pages instantly (WooCommerce description stays empty in the database).

Includes: setup wizard, live storefront preview, variable library with click-to-insert, quick phrase snippets, and **See it on your store**.

### PRO: Bulk SEO with AI

Upgrade for **unique AI-generated text**, batch apply to the database, preview with quality reasons, cost estimate, and one-click rollback. Same plugin — PRO add-on sold separately.

= Free features =

* **Fill Empty Categories** — runtime template for all empty `product_cat` pages.
* Template marketplace (9 store-ready styles) + custom wording.
* Live preview with real category data and collapse mockup.
* Variable library: `{category_name}`, `{products_count}`, `{min_price}`, `{max_price}`, `{shop_name}`, and more.
* Optional setup wizard + victory flow after first save.
* Text collapse for category descriptions (desktop + mobile line limits).
* Optional collapse for product full and short descriptions.
* Button presets, alignment, fade gradient, exclusions.
* Shortcodes `[scatseo_toggle]` / `[scatseo_collapse]`.
* Compatible with AJAX/PJAX themes (e.g. WoodMart-style category tabs).

= PRO features (add-on) =

* AI generation for categories, product descriptions, and excerpts.
* SERP packages (title, meta, focus keyphrase) with Yoast / Rank Math adapters.
* Batch preview, Quality Guard, cost estimate, rollback.
* Per-category templates, `{if}` conditionals, bulk write to database.
* Private updates via license server.

**Privacy (Free):** settings stay in your WordPress database. The free plugin does not call external APIs.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate in **Plugins** (WooCommerce must be active).
3. Open **SEO AI for WooCommerce** in the admin menu.
4. Go to **Fill Empty Categories** → run the wizard or pick a style → **Save**.
5. Click **See it on your store** to verify on a live empty category page.

== Quick Start (Free, ~60 seconds) ==

1. **Fill Empty Categories** tab → **Get Started** (or skip to manual setup).
2. Choose a **category** with an empty description.
3. Pick a **template style** (or write your own).
4. Check **What visitors see** (live preview).
5. **Save** → open **See it on your store**.

Pass criteria: visible category text on the storefront for an empty category, without editing each category in WooCommerce.

== Quick Start (PRO) ==

1. Connect AI API key → test key.
2. Count empty entities → AI preview → run batch.
3. Rollback last batch if needed.

== Frequently Asked Questions ==

= Why are my category pages empty? =

WooCommerce does not auto-fill category descriptions. This plugin shows helpful runtime text on **empty** categories using one template and dynamic variables — no per-category editing in Free.

= Does Free write to my category descriptions in the database? =

No. Free uses a **runtime template** (your WooCommerce category description field stays empty). PRO can bulk-write unique text to the database.

= Is collapsed text safe for SEO? =

Yes. Text remains in the HTML and is indexable. Collapse is for readability, not cloaking.

= Does it work with AJAX themes? =

Yes. Includes compatibility for dynamic content and category tab switches without full page reload.

= Can I use AI in the free plugin? =

AI bulk generation is **PRO only**. Free focuses on fill-empty templates and text collapse.

= How do I add descriptions to empty WooCommerce categories? =

Open **Fill Empty Categories** in the admin menu: pick a template style (or write your own), preview with real catalog data (name, stock count, prices), and save. One template covers every empty `product_cat` page on the storefront — no API key and no editing each category in WooCommerce. For unique AI-written text saved to the database, use the PRO add-on.

= Can I bulk generate product and category descriptions with AI? =

**PRO only.** Connect your AI provider API key, count empty categories or products, run AI preview, then apply in batch with cost estimate and one-click rollback. Free fills empty **category** pages with one runtime template (the WooCommerce description field stays empty in the database). SERP fields (title, meta description, focus keyphrase) sync to Yoast SEO and Rank Math via PRO.

== Screenshots ==

1. Dashboard — Fill empty category pages in about a minute (Free hero + metrics).
2. Fill Empty Categories — template marketplace with 2-line style previews.
3. Live preview — real category data + storefront collapse mockup.
4. Variable library — click to insert + current values from selected category.
5. Setup wizard + victory state after first save.
6. Display tab — collapse lines, button preset, gradient (optional).

(Add PNG files as `assets/screenshots/1.png` … `6.png` before WordPress.org upload; see `docs/fill-empty-categories-mvp-checklist.md`.)

== Changelog ==

= 1.0.10 =
* Fill Empty Categories: redesigned first-time setup wizard to match plugin admin UI (rounded buttons, spacing, progress bar, step hints).
* Admin: wizard navigation and restart link use the same design tokens as the rest of the settings page.

= 1.0.9 =
* WordPress.org listing: short description, tags, and FAQ tuned for category/product description and fill-empty search queries (readme only; no code changes).

= 1.0.8 =
* Fill Empty Categories: syntax highlighting for `{variables}`, active variable chips, and usage counter.
* Admin: no page scroll when inserting variables or marketplace styles; client-side template validation before save.
* Admin: rendered length hints, marketplace “Show full” preview, Ctrl+S save on the templates tab.
* i18n: Russian strings for new Fill Empty admin UI.

= 1.0.7 =
* Hotfix: ensure all template engine include files are packaged in the plugin zip (fixes fatal error on activation for some 1.0.6 downloads).
* No functional changes beyond 1.0.6 when all files are present.

= 1.0.6 =
* Free: **Fill Empty Categories** tab — wizard, template marketplace (9 styles), live AJAX preview, variable library, quick phrases, victory flow, **See it on your store**.
* Free: tiered template variables registry + expanded runtime placeholders (`{shop_name}`, `{currency}`, `{category_url}`, etc.).
* Admin: dashboard and copy aligned to “fill empty in about a minute” (Free) vs AI workspace (PRO).
* Docs: 60-second benchmark + MVP QA checklist (`docs/fill-empty-categories-mvp-checklist.md`).

= 1.0.5 =
* Admin: fixed settings save (color pickers sync before submit, no PHP warnings in inline scripts).
* Admin: unified button style presets (Link, Outline, Filled, Pill).
* Admin: live preview reads wpColorPicker values; preset cards update colors and preview together.
* Frontend: PRO/custom button colors apply via dynamic CSS and toggle.js with theme-safe specificity.
* Options: scatseo_btn_style is the source of truth; legacy scatseo_btn_preset stays in sync on save.

= 1.0.4 =
* Fixed PRO purchase links: pricing section on smartcategoryseo.online.

= 1.0.3 =
* Removed direct style tag output; CSS via wp_add_inline_style().
* Cache transients regenerate automatically (no direct update_option migration).

= 1.0.2 =
* register_setting() sanitize_callback for every option.
* Shortcode preview escaped via wp_kses_post().

= 1.0.1 =
* Renamed prefix scs → scatseo; migration for existing options/meta.
* Shortcodes [scatseo_toggle] and [scatseo_collapse].

= 1.0.0 =
* Initial public release.
