=== SEO Meta Templates for WooCommerce ===
Contributors: catcodestudio
Tags: woocommerce, seo, meta title, meta description, bulk edit
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

One template with placeholders instead of thousands of hand-written meta tags: bulk meta title, description and H1 for a WooCommerce catalogue.

== Description ==

Filling in meta tags by hand for a catalogue of several thousand products is not realistic, and without them the pages compete against each other in search results. This plugin describes title, description and H1 as a formula with placeholders, shows the "before → after" result before anything is written, and applies it in batches — no timeouts even on tens of thousands of products.

= Free features =

* Meta title, meta description and H1 templates for **products** and **product categories**
* Placeholders: `{name}`, `{category}`, `{brand}`, `{price}`, `{sku}`, `{store}` and about twenty more — model, attribute, option, product count, minimum price, stock status, year, page number, separator
* Compatible with the templates of the OpenCart version of the module: `{product_name}`, `{manufacturer}`, `{store_name}`, `{title}`, `{attribute:Colour}`, `{option:Size}` behave identically
* An empty variable is removed together with the leftover separator, so the line never falls apart
* Optional blocks `[ SKU {sku}. ]` disappear completely when the variable inside them is empty
* A title suffix for pages 2 and up, so pagination does not duplicate the first page
* Without a licence key one generation run processes up to 200 objects — everything already generated keeps working
* Preview (dry run) with a "before → after" list and length-overflow highlighting
* "Fill empty values only" mode — manually written meta tags are never overwritten
* Bulk apply in batches with a progress bar and a "Stop" button
* Length control for title and description with word-boundary trimming
* Integration with **Yoast SEO** and **Rank Math**: the values are written straight into their fields. With no SEO plugin installed the plugin stores its own fields and prints the tags in `wp_head`

= Pro features =

* Templates for **product tags** and **attribute values** (`pa_*`)
* `rel=canonical` cleaned of `filter_*`, `orderby`, `min_price`, `max_price` and UTM tags; self-canonical or canonical to the first page; `rel=prev` / `rel=next`; `noindex` for filters, sorting, pagination and search
* Rules **per category or brand** with a priority: a dedicated template for a single branch of the catalogue
* Unlimited volume for a single generation run
* **Schedule** for automatic regeneration (daily / weekly / monthly)
* **Rollback** of the last run in one click — the previous values are kept

A fresh install is simply the free tier: nothing Pro switches itself on. Pro fields stay visible but greyed out with a short note on what they do. The 7-day trial starts only when you click "Try Pro for 7 days" and enter an e-mail: the licence server issues a real key and mails it to you. When it ends the free tier keeps working with no time limit. The licence is annual (1–5 years) and includes updates and support for that period.

= Requirements =

* WooCommerce 7.0 or newer
* PHP 7.4+

The plugin interface is fully translated into Ukrainian. / Інтерфейс плагіна повністю перекладено українською.

== Installation ==

1. Upload the plugin and activate it.
2. Go to WooCommerce → "SEO-шаблонізатор".
3. On the "Templates" tab describe title, description and H1 as a formula.
4. On the "Generation" tab press "Preview (dry run)", check the result and apply it.

== Frequently Asked Questions ==

= Will the plugin overwrite meta tags I wrote by hand? =

No, not until you switch the mode to "Overwrite everything" yourself. By default only empty fields are filled in.

= What if I do not like the result? =

Open the "History and rollback" tab and press "Roll back the last run" — the previous values are stored for every run.

= Will a catalogue of 20 000 products survive it? =

Yes. Generation runs in AJAX batches with a progress bar instead of one long request, so `max_execution_time` does not matter.

= Where exactly are the meta tags stored? =

If Yoast SEO or Rank Math is active — in their own fields, so every familiar tool keeps working. With no SEO plugin installed the plugin stores its own fields and prints `<title>` and `<meta name="description">` itself.

= Why is H1 stored separately? =

No SEO plugin has a field for H1, and rewriting the product name for the sake of a heading would break the catalogue, the cart and the e-mails. So H1 lives in its own field and is only substituted into the heading of the page itself.

= Will canonical break filter pages for shoppers? =

No. The pages stay reachable; only the address that search engines treat as the main one changes.

= Which placeholders are available? =

The full list is in the settings, on the "Templates" tab. The main ones: `{name}`, `{category}`, `{brand}`, `{price}`, `{sku}`, `{store}`, `{model}`, `{count}`, `{min_price}`, `{attribute:pa_color}`, `{year}`.

== Screenshots ==

1. The "Templates" tab with length counters
2. The "before → after" preview before applying
3. Bulk generation in batches with a progress bar
4. Per-category rules (Pro)
5. Canonical and noindex on filters (Pro)

== Changelog ==

= 1.1.0 =
* Pro is no longer switched on by itself. A fresh install is the free tier; the 7-day trial starts only from the "Try Pro for 7 days" button.
* Trial issues a real licence key through the CatCode licence server and mails it to you, exactly like a paid one.
* Licence keys are now verified against the licence server (activate on save, re-verified daily); Pro survives 14 days of the server being unreachable.
* "Release licence" button frees the key for another shop.
* Pro settings stay on screen, greyed out, with one line explaining what each gives — and are no longer wiped when the settings form is saved without a licence.
* A single dismissible notice, shown after the first successful run instead of right after activation. Dismissed once = never again.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.1.0 =
Pro no longer starts by itself. If you were relying on the automatic 7-day trial, start it from the Licence tab.

= 1.0.0 =
Initial release.
