=== Rooster One ===
Contributors: oxfordmetadata
Tags: woocommerce, ai, seo, automation, performance
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 10.0
Woocommerce tested up to: 10.9
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

One model of your shop, read by every surface: AI chat, recommendations, SEO, measurement, merchandising, fulfilment. Anthropic Claude + Voyage AI.

== Description ==
# One model of your business. Every surface reads it.

Rooster One is not a bundle of plugins sharing an admin menu.

It builds **one measured model of your business** — every product, page, customer, order and session, scored on a schedule into flat tables — and then puts surfaces on top of it. Your SEO score, your product recommendations, your customer audiences, your ad ROI and the answers your AI assistant gives a shopper all read that same model.

That is why they agree with each other. Install twelve plugins and you get twelve versions of the truth: twelve crons, twelve sets of tables, and twelve opinions about what a "conversion" is, which product is selling and which page is working. Ask two of them the same question and you get two answers, and no way to tell which one is lying.

It is also why the plugin gets *faster* to use, not slower, as you switch things on. The expensive thinking happens on a schedule, not in your customer's request. A product page reads a single cached row. The SEO head is assembled once and served from a cache. Each capability you enable adds a surface onto work that has already been done — it does not add another query to every page load.

**Everything is off by default.** Rooster One installs alongside your current SEO plugin, your pixel manager and your consent tool and changes nothing until you switch a piece on — and each piece switches on independently, so you can adopt it over months rather than in an afternoon.

**The free version is a complete product**, not a demo: the AI assistant, the full SEO engine, the pricing and merchandising stack, the storefront surfaces, measurement and consent, and the product feeds are all in it. **Pro** adds the operational half — fulfilment, marketplace order import, attribution and ROI, audiences and automated campaigns — and delivers the separate **front-end runtime plugin**, which serves your storefront without ever loading the admin half. See "Free and Pro" below.

### It reads your site for what it is

Not every WordPress site is a shop, and measuring a catalogue or a magazine as if it were one produces confident nonsense. Rooster One classifies your site as one of three profiles — and tells you which, in the admin header:

* **Shop** — transactional WooCommerce. Sales and add-to-carts are the measure of success.
* **Catalogue** — products published but deliberately not sold (a brand showcase, a trade catalogue). Products are content; engagement is the measure.
* **Content** — no WooCommerce at all. Visits, engagement and form submissions are the measure.

Opportunity scoring, cornerstone selection, the demand score and which signals are even applicable all follow from that one choice. It is auto-detected from real evidence and can be overridden in one click when you know better.

### You can find all of it

A suite this large is worthless if you cannot find the screen you need. Every destination is indexed, described and searchable:

* **Ctrl+K from any admin screen** reaches **617 addressable places** — 157 pages, 25 in-page tabs and 435 anchored panels — searchable by name, by what they do, or by the nouns you actually think in.
* **All Features** lists every destination on one page, grouped as the menu is, with drag-to-reorder cards and star-to-pin favourites that follow you into the header everywhere.
* **Every page and tab carries a written description** of what you can *do* there — not a restatement of its name. The same text feeds the search, so "ΑΦΜ", "Omnibus", "packing slip" or "disavow" finds the screen that does it even when the word appears nowhere in a menu label.

== What the model is made of ==

Everything below reads these. They are computed on a schedule, stored flat, and are the reason the rest of the plugin can be both consistent and fast.

* **Product vitals** — per product and variation: sales velocity, out-of-stock history, price history, basket role (opened the order / closed it / bought alone), returns and cancellation rate, and a 0–100 demand score.
* **Content vitals** — the same treatment for every post, page and custom type: reach, engagement, freshness and a content-demand score, with the same time-of-day and day-of-week consumption bands the shop side uses.
* **Customer vitals** — an omnichannel profile joining eshop and in-store behaviour: what someone buys, their affinities, their lifecycle stage, their survey answers and their risk of returning goods.
* **Session and attribution rollups** — engagement joined to conversion through a single session id, with landing page, campaign and the five UTMs parsed once and rolled up daily.
* **Effective prices and eligibility** — every price rule (role, brand, loyalty, schedule, gift, free shipping) resolved ahead of time into one row per product per audience, so the storefront never recomputes a pricing stack.

== Surfaces ==

### Answering customers — AI chat & semantic search
* A floating, fully themeable chat widget that answers shoppers in natural language, grounded in your own catalogue and content by retrieval-augmented search on **Anthropic Claude**. It recommends only real, in-stock items with exact links, and never invents products.
* **Semantic search** powered by **Voyage AI** embeddings across products, posts, pages and taxonomy terms — shoppers find things by meaning, not keywords. Embeddings refresh only when content actually changes.
* **A curated knowledge base** you control — opening hours, delivery times, returns policy, store addresses — always in context, with identity guardrails ("what this site IS / is NOT") so it cannot mis-describe you.
* **Site-type aware** — a shopping assistant on a shop, a content guide on a portal, a support assistant on a corporate site.
* **Chat analytics** — what shoppers asked, how they rated the answers, which page they started from, which questions returned nothing (your catalogue gaps), and which conversations ended in an order.

### Getting found — the in-house SEO engine
A complete, Greek-aware replacement for AIOSEO/Yoast that self-gates behind your existing SEO plugin until you switch it on, with a read-only importer and a head-parity check before you cut over.

* Title, meta description, canonical, robots, Open Graph, Twitter and JSON-LD, assembled once into a head cache and served in a single cached read.
* **Commerce schema from the model, never live queries** — `ProductGroup` + `hasVariant`, real per-variant colour from your own swatch attributes, `gtin`, brand, sale-price strikethrough, shipping and return policy on every Offer. Archives emit `CollectionPage` + `ItemList` + `BreadcrumbList`.
* **AI titles and descriptions written against the live SERP** — a nightly queue picks your highest-ROI pages, pulls the real Google results for the target keyword, and has Claude write copy to beat that exact SERP. Drafts wait for approval, or switch on Autopilot.
* **Opportunity grid** — every product and page placed on traffic × conversion (hidden gem, intent mismatch, defend, prune), with cornerstone pages chosen from real performance rather than a manual flag.
* **Rank tracking** via an optional DataForSEO account: weekly snapshots of every keyword you rank for, and striking-distance opportunities (positions 8–20 by volume) under a spend cap you set.
* **Redirects and 404s**, an automatic slug monitor, a static outage-proof sitemap served as files even when the plugin is off, a managed robots.txt, image alt-text filling, EU Omnibus lowest-price history, and multilingual head + hreflang (WPML / Polylang / TranslatePress).
* **Local SEO** — a `LocalBusiness` node per store with hours, geo and Maps links, plus store pages and locator blocks.

### Selling more to the customers you already have
* **Recommendations** — up-sell and cross-sell pairings from your real sales patterns, plus "products for the same need" that surface genuine alternatives via your need taxonomy, ranked by pre-computed performance and de-duplicated against your existing pairings.
* **Recommendation rails, ordered your way** — drag-and-drop ordering with per-rail show/hide on both block and classic themes, and custom slots between them for rich HTML, shortcodes or a video-shopping widget.
* **Pricing engine** — per-role and wholesale prices, time-windowed brand and product discounts, loyalty tiers, a points and rewards balance, and free-gift thresholds, all stacked so each customer sees the strongest applicable price, resolved ahead of time.
* **Merchandising** — swatches, SALE/NEW/Hot labels, trust badges, payment logos, per-variation galleries, a drag-and-drop product-page layout builder, renamable custom tabs, and a master button-style control every storefront button inherits.
* **Lift measurement** built in, so you can see the incremental orders and revenue the engine adds per channel.

### Cart, checkout and recovery
* A floating **side cart** with recommendations and a free-shipping progress bar, and a **sticky add-to-cart** bar.
* **Saved and abandoned carts** — shoppers save, share and resume carts (cookieless restore that survives CDN caching), backed by a permanent log with outcomes and KPIs.
* **Wishlist** with analytics, and a **back-in-stock waitlist** with automatic stock-watcher emails.
* **Checkout tuning** — distraction-free checkout with built-in A/B assignment, minimum-order enforcement, and Greek professional-invoice (τιμολόγιο) fields with AADE lookup, on both classic and block checkout.
* Full **WooCommerce block cart and checkout parity** — every surface works identically on block and classic.

### Reaching customers
* **Audiences** built from the customer model — top, lapsed, lookalike, abandoned-cart, reactivation, competition entrants — recomputed nightly and reusable everywhere.
* **Automated campaigns** triggered by what a shopper actually does: abandoned cart, win-back, birthday, back in stock, post-purchase follow-up — over email and web push, with quiet hours honoured globally.
* **Web push** with opt-in prompt, subscriber segments, a dispatch log and click attribution.
* **Social posts** drafted from your own catalogue, and **competitions** run off any Gravity Form with landing pages and entrant-revenue insights.
* **Surveys** ingested into NPS, satisfaction, priorities and discovery metrics with a composite voice-of-customer score.

### Knowing what worked
* **First-party, server-side measurement** you own: Meta Pixel + Conversions API, GA4 + Measurement Protocol, Google Ads Enhanced Conversions, TikTok Pixel + Events API — deduplicated on a shared event id and dispatched after the order is saved, so checkout adds no latency. A confirmed 2xx is required before an order counts as sent, and a daily safety net re-fires anything dropped.
* **Consent / GDPR CMP** — a first-party banner with per-category preferences, driving Google Consent Mode v2 with cache-safe defaults, carrying consent in-band on every server event, with a proof-of-consent audit log and a cookie scanner.
* **ROI Wizard** — pick a dimension (recommendation engine, offer, channel, campaign, creative), a value and a period, and see orders, revenue, cost, net, ROAS and ROI with period-over-period comparison.
* **Ad-spend ledger** — enter spend, import a CSV, or connect Google Ads / Meta / TikTok to pull it nightly.
* **Conversion goals for non-shops** — choose which forms and actions count, so portals and publishers get a real conversion story.
* **Insights Chat** — ask your shop questions in plain language inside wp-admin, answered from the model by read-only data abilities registered on the WordPress Abilities API. Customers are pseudonymised; no BI subscription, no data export.

### Running the shop
* **Marketplace order import** — Skroutz, Shopflix, eMAG, eFood, Wolt, Etsy and Amazon orders arrive as native WooCommerce orders by polling or signed webhook, so stock, attribution and fulfilment stay unified.
* **Catalogue importer** — the mirror of the feeds: recreate products from eFood, Etsy, Wolt or Amazon, auto-building categories, attributes and option groups, matching on SKU so a re-run updates in place.
* **Streaming feeds** (XML/CSV) built for large catalogues, with Google Shopping, Google Local, Skroutz, BestPrice, Shopflix, Meta and Amazon templates.
* **Courier fulfilment** — ACS, BoxNow, Courier Center, ELTA, Geniki, Speedex and a custom driver: vouchers, labels, COD and tracking from the order, bulk printing and per-courier daily closings. Order documents (invoices, packing slips, proformas, credit notes) print singly or merged across a date range.
* **Delivery economics** — a real break-even free-shipping threshold computed from your carrier costs, with a per-carrier × zone P&L and a retrospective shipping-cost scanner.
* **Operational intelligence** — stock recovery for products your stores still sell, missing hot sellers not yet online, a self-tuning out-of-stock predictor, and multi-branch stock, supplier and barcode scanning with optional ERP integration.

### Content, events and local
* **Events** with schedule, RSVP, venue, participant import and tokenised self-registration; **FAQ** groups with an accordion shortcode; **Store Pages** bound to locations; **Food & Beverages** option groups with modifiers and running totals.
* **Google reviews** per location on a schedule, with rating blocks.
* **Media Cleanup** — a resumable tool that reclaims disk from stale thumbnails and true orphans, quarantining first and never touching a referenced file.

### A large native block library
Dozens of server-rendered blocks in your inserter: Google Reviews, Business Info, Opening Hours, Store Hero/Info/Locator/Map; Product Slider, Recommendations, Needs, Swatches, Variations Gallery, Omnibus message, Free-Shipping bar, Product Meta; Brand Rails, Slider, A–Z index, Story, Archive Hero; Latest Posts Overlay, Breadcrumb, Category and Blog heroes, Taxonomy archive blocks; Competition and Event registration; and Custom Slot layout regions.

### Built for the Greek and Cypriot market
First-class support for the couriers, marketplaces and payment habits Greek shoppers actually use — Greek courier drivers with vouchers and daily closings, Greek marketplace import and feeds, **COD enabled or disabled by destination country or by chosen courier**, honest "from X,XX €" shipping labels before a postcode is entered, AADE ΑΦΜ lookup at checkout, and a complete Greek admin and storefront translation.

### Built for speed and resilience
* The expensive work is pre-computed into flat tables; the storefront reads single cached rows.
* A thin **front-end runtime plugin** (Pro) serves storefront features, the SEO head, the sitemap and redirects even when the admin plugin is trimmed from a request — so a shopper's page load never pays for the admin.
* **Self-healing background jobs** re-arm if an update or a wiped cron table drops them, stay dormant until their feature is in use, and collapse runaway third-party scheduled tasks.
* Tables are **never dropped on update, activation or deactivation** — only on explicit uninstall.

== Free and Pro ==

This plugin is GPLv3 and the free version is a complete, working product — not a demo with the useful parts removed. Everything a shop needs to sell, be found and look right is in it.

**Free — everything above except where marked, including:**

* The **AI chat assistant** and semantic search across your catalogue and content.
* The complete **in-house SEO engine** — head, schema, redirects, sitemap, opportunity grid, AI titles and descriptions, local SEO.
* The whole **pricing and merchandising** stack — role and wholesale prices, brand discounts, loyalty tiers, free gifts, free-shipping rules, swatches, labels, product-page layout builder.
* **Storefront surfaces** — side cart, sticky add-to-cart, wishlist, back-in-stock waitlist, saved and abandoned carts, block and classic checkout parity.
* **Measurement and consent** — Meta, GA4, Google Ads and TikTok server-side events, and the first-party consent banner with Consent Mode v2.
* **Product feeds** for Google, Meta, Skroutz, BestPrice, Shopflix, eMAG and Amazon, plus the catalogue importer.
* The **block library**, the **Ctrl+K navigator** and every written description.

**Pro adds the operational half — the parts that run a business rather than a shop window:**

* **The front-end runtime plugin.** A separate, frontend-only companion that serves the storefront, SEO head, sitemap and redirects on their own, so browsing never loads the admin half. This is the single biggest speed difference between free and Pro.
* **Fulfilment** — courier drivers (ACS, BoxNow, Courier Center, ELTA, Geniki, Speedex, custom), vouchers, labels, order documents, bulk printing and per-courier daily closings.
* **Marketplace order import** — Skroutz, Shopflix, eMAG, eFood, Wolt, Etsy and Amazon orders arriving as native WooCommerce orders.
* **Attribution and ROI** — the attribution dashboard, ROI Wizard, ad-spend connectors and shipping-cost-against-margin reporting.
* **Audiences and campaigns** — the audience builder, automated email and web-push flows, web-push subscribers, social posts, and AI-suggested offers.
* **Customer intelligence** — individual customer lookup, surveys and voice-of-customer scoring, cancellations and returns analysis, and chat analytics.
* **Insights Chat** — ask your shop questions in plain language inside wp-admin.
* **Physical retail and ERP** — branch stock scanning, stock recovery, missing hot sellers, the ERP bridge, encrypted external-database connections and analytics streaming to your own warehouse.
* **Events and competitions**, and Action Scheduler cleanup for busy queues.

Pro is activated by connecting the site to your Rooster One account; there are no keys to paste per feature. Everything Pro-locked is visible in the admin with an explanation of what it does, so you always know what you would be turning on.

== Optional integrations ==

Rooster One runs entirely on your own server. Nothing below is required for the plugin to work — each is an opt-in add-on you enable only if you want that capability, using your own account.

* **Rooster AI credits** (rooster.systems) — powers the AI chat, AI SEO copy and Insights Chat via Anthropic Claude and Voyage AI embeddings, with no per-provider API keys to manage.
* **Recommendations service** (eshop-optimizer.com) — graph-database up-sell/cross-sell analysis of your order history.
* **DataForSEO** — optional keyword rank tracking under a spend cap you set.
* **Ad and measurement platforms** — Google Ads, GA4, Meta and TikTok, each independently selectable.
* **Couriers and marketplaces** — your own carrier and marketplace accounts, for vouchers and order import.
* **Google Places / Search Console**, and **AADE** for Greek VAT lookup at checkout.

== Privacy ==

For WooCommerce stores, product recommendations are produced by our graph-database service at https://eshop-optimizer.com. It is **privacy-centric**: you can opt out of sharing product and category names and prices with limited impact on quality, and withhold customer IDs for anonymity. Oxford Metadata Ltd maintains privacy provisions approved by both Google and Facebook — see https://eshop-optimizer.com/compliance.

Hashed PII is never stored or logged raw. Customers are pseudonymised in Insights Chat. Consent is recorded with an IP/UA-hashed proof-of-consent audit log.

== Installation ==

1. Install through **Plugins → Add New** and search for "Rooster One", or upload the plugin zip to `wp-content/plugins/`.
2. Activate it. Nothing changes on your site yet — almost everything ships off by default.
3. Open **Rooster One** in the admin menu. The header shows whether your site was read as a shop, a catalogue or a content site; correct it in one click if it is wrong.
4. Switch on one capability at a time. Each runs alongside your existing tools until you retire them.

Press **Ctrl+K** on any admin screen to find anything.

== Frequently Asked Questions ==

= Do I need WooCommerce? =
No. Rooster One works on content sites and catalogues too, and adapts what it measures: a content site is scored on visits, engagement and form submissions rather than sales.

= Will it conflict with my current SEO plugin? =
No. The SEO engine self-gates behind AIOSEO, Yoast and Rank Math and stays dormant until you explicitly switch it on. There is a read-only importer and a head-parity check so you can compare output before cutting over.

= Do I have to pay for AI to use the plugin? =
No. The plugin is GPLv3 and a great deal of it — the chat, recommendations, the SEO engine and every storefront and pricing tool — runs without any subscription. Features that call a model consume Rooster AI credits.

= What does Pro add? =
The operational half: courier fulfilment and order documents, marketplace order import, attribution and ROI, audiences and automated campaigns, web push, customer intelligence, Insights Chat, physical-retail and ERP tooling, and events and competitions. Pro also delivers the **front-end runtime plugin** — a separate, frontend-only companion that serves the storefront, SEO head, sitemap and redirects without loading the admin half, which is the biggest single speed difference between free and Pro. See "Free and Pro" above for the full split.

= Is the free version crippled? =
No. It is a complete product: the AI assistant, the full SEO engine, the whole pricing and merchandising stack, the storefront surfaces, measurement and consent, and the product feeds are all in the free version. Pro adds operational capability, not the basics.

= Will it slow my site down? =
The design goal is the opposite. Expensive work is pre-computed on a schedule into flat tables and the storefront reads single cached rows, so enabling a feature adds a surface rather than a per-request query.

= What happens to my data if I update or deactivate? =
Nothing is removed. Tables are never dropped on update, activation or deactivation — only when you explicitly uninstall the plugin.

= Is it translated? =
Yes, fully into Greek — admin and storefront — and it is written to be translated: source strings are English and extractable with Poedit.

== Changelog ==

= 10.0 - 2026-07-27 =
**Everything in the plugin is now findable, described and correctly named — in English source and in Greek.**

**Find anything**
* Every one of the 617 addressable destinations — 157 pages, 25 in-page tabs and 435 anchored panels — is reachable from **Ctrl+K** on any admin screen.
* All 195 pages and tabs now carry a written one-line description of what you can *do* there. Hover any destination for a styled explanation; sections inside a page say which page they belong to instead of borrowing its text.
* Descriptions feed the search index, so a destination is findable by the nouns it deals in ("ΑΦΜ", "Omnibus", "packing slip", "disavow") and not only by its label.

**Know what kind of site Rooster One thinks you are**
* The admin header now shows your site profile — shop, catalogue or content — whether it was auto-detected or set by you, and warns when a manual setting no longer matches the evidence. One click to change it.

**Translation**
* Every source string in the codebase is now English. 151 Greek literals across both plugins were converted, with the Greek preserved exactly as translations, so nothing a shopper reads changed.
* Duplicate translations of the same concept were merged onto single strings, and the admin navigator's ↵ hint no longer reads "open" as an adjective.
* Four checkout invoice fields in the runtime plugin had never been translatable at all and now are.

**Fixes**
* OpenAI was dropped as a provider in May, but the AI settings form could still store it: the dropdowns stopped offering it while the save handler kept accepting it, so a stale submission could switch a live site onto an unsupported provider. The form now writes only Anthropic and Voyage.
* The AI credits check told operators the Content Connector was not configured even when it was — that message is only reachable *after* the token authenticates. It now distinguishes "no Anthropic key on the account" from "AI service disabled", names the account and links to the portal.
* Admin hero copy no longer quotes one particular shop's catalogue size as if it were yours, and no longer claims there are no restrictions.

= 9.5 - 2026-07-27 =
**Your data stays put on update, timings follow your shop's clock, and audiences resolve to real people.**

**Nothing is deleted by an update any more**

* Updating or deactivating the plugin no longer drops a single database table. Deactivating from a **multisite network** screen previously dropped twelve working tables along with your live sessions and session archive — on one test store that was over 900,000 archived rows. Table teardown now happens in exactly one place: uninstalling the plugin.
* Two schema migrations used to destroy live data whenever they ran. Updating could empty the lifetime "has ever bought" rollup — which silently made every purchase-history audience match **nobody** until the next nightly rebuild, so campaigns aimed at past buyers sent to an empty list — and any survey schema change discarded every stored Gravity Forms response, including NPS and free-text feedback. Both now migrate in place and keep your rows.
* Uninstalling now cleans up properly and completely: tables, stored routines, options, transients and scheduled jobs, across every site on a multisite network. Set `aieo_preserve_data_on_uninstall` if you remove the plugin for any reason other than a real decommission.

**Times and dates follow your WordPress timezone**

* Report windows such as "this month" now use the timezone set in **Settings → General**, not the server's clock. If your host sits in a different timezone from your shop, monthly figures previously started and ended at the wrong moment; on a server hosting several shops in different countries, no single clock could be right for all of them. Daylight saving is handled per date.
* Several timestamps were stored in the server's local time while the values beside them were stored in GMT, which made cached entries look newer than they were and could sort them incorrectly.
* The sales predictor now decides "the last day we had sales" using your shop's calendar day. On a store in a timezone ahead of GMT, orders placed shortly after midnight counted as the previous day, which could make the predictor treat an active shop as dormant.

**Marketplace orders**

* Two WooCommerce orders could be created from a single marketplace order — seen with Skroutz, possible with any connected marketplace — when a delivery arrived twice and the first import had not finished. Imports now claim an order before creating it, so a repeat delivery joins the existing order instead of duplicating it. An interrupted import releases its claim automatically.

**Finding things**

* The Quick Navigator (Ctrl/Cmd+K) now shows each item's real menu location, no longer lists the same page twice, and displays "&" correctly instead of "&amp;".
* Recommendation caches are now cleared after a WordPress core upgrade. The routine existed but had never once run, because it looked for a table under the wrong name.
* Removed a duplicated, four-month-stale second copy of the marketplace importer. Files removed by a release are now deleted on activation, so installs updated in place do not keep them.

**From the earlier 9.5 work**

* Segment and cohort CSV exports no longer download empty files. Nine of fourteen targetable audiences — including VIP, Loyalist and Brand-Devoted — silently exported zero rows because the export filtered on the dormancy column for every name. One resolver now serves every caller.
* New retroactive identity backfill links past orders to the people who placed them: Data Pipeline → Identity resolution, `wp aieo identity backfill`, or a daily job. Safe to re-run as often as you like.
* Three additional points where a visitor is identified: registration, WooCommerce customer creation, and checkout.
* Fixed an Action Scheduler query guard that truncated the plugin's own health probe, making the Signals screen report existing tables as missing.
* Data prep schedule and Product/Orders analytics merged into one Data Pipeline page; Signals moved to its own page.

= 9.4 - 2026-07-23 =
**Correctness hardening for the faster price lookup introduced in 9.3.**

* **Fixed: the faster price lookup could show the wrong price on a multi-currency store.** Currency plugins that convert prices after WooCommerce has gathered them — including WooCommerce Multilingual — were not detected, so a shop could display an unconverted price. The check now recognises them and falls back to the slower, always-correct calculation whenever any pricing extension is involved.
* **Fixed: the same lookup could show a stale or truncated price.** WooCommerce keeps a summary of each variable product's price range, and that summary can fall behind if prices are imported without it being refreshed, or be misread when a price is stored with a comma as the decimal separator. The price shown is now cross-checked against the product's own variations, and anything that disagrees falls back to the full calculation.
* **Fixed: prices stored with comma decimals are now read correctly.** On European stores a price saved as "24,99" could be read as 24.00 by parts of the system that read the database directly, understating the price. Values are now interpreted using the store's own number format.

* **Fixed: deleting a colour or size no longer leaves stale swatches behind.** Removing an attribute term did not refresh the products that used it, so their swatches could keep showing the removed option until each product was next saved. Deletions now refresh the affected products, as edits already did.
* **Faster attribute edits during imports.** Editing attribute terms — which product imports do constantly — used to run one database query per affected variation. The affected products are now found in a single query and refreshed once per import run rather than once per edit.

= 9.3 - 2026-07-22 =
**Faster variable-product pricing, and correct prices for professional customers after a price import.**

* **Fixed: professional customers could see outdated prices for up to 30 days after a role-price import.** WooCommerce caches the price range of a variable product, and the cache key recorded who was viewing but not which version of the role-price data was in force. Uploading a new role-price CSV therefore left professionals on the previous cached prices until each product happened to be re-saved. The role-price data version is now part of the key, so an import takes effect immediately. Public prices are unaffected and their caches are left intact.
* **Faster storefront pages for logged-in customers.** The same cache key was being varied by every role a customer holds, including roles that have no effect on price at all — so ordinary customers, loyalty members and newsletter subscribers each caused the shop to recalculate a variable product's price range from scratch, arriving at exactly the same answer as for a logged-out visitor. The key now varies only by the roles that actually change the price, so those customers share the public result.
* **Faster recommendation and side-cart cards.** Building a card for a variable product meant loading every one of its variations to work out the price range — on a product with 150 variations that is substantial work, repeated per card. Where it is safe to do so, the range now comes from the index WooCommerce already maintains for exactly this purpose. Products with role-based pricing, and stores that display tax-inclusive prices, keep the previous behaviour.
* **Fixed: prices shown in product labels and structured data ignored tax display settings.** Discount labels and the price range published in structured data were built from raw prices rather than the prices shoppers actually see, which on a tax-inclusive store meant both were understated. They now match the displayed price.
* **Reduced repeated settings lookups on price-heavy pages.** The plugin's settings tree was being rebuilt from scratch on every internal lookup, which on a large variable product could happen several hundred times in a single page render. It is now built once per request.

= 9.2 - 2026-07-21 =
**Analytics and nightly jobs now repair their own database routines.**

* **Fixed: nightly jobs could fail forever after a site restore or migration.** Database backups exclude stored routines unless explicitly asked for, so restoring a site could silently drop the procedures that power surveys, web-push customer intelligence, product needs and session analytics — while the plugin still believed they were installed. The affected jobs then failed every night with "PROCEDURE … does not exist", and reinstalling or reactivating the plugin did not help, because the check was based on a stored version number rather than on whether the routines actually existed.
* **Now self-healing.** Each job detects a missing routine at the moment it needs it, reinstalls it and retries once. This costs nothing on normal page loads — there is no extra check on storefront requests — and it repairs itself inside the nightly job or an admin action instead of needing manual intervention.
* Covers the survey ingest/intelligence procedures, the web-push customer-intelligence recompute and segment assignment, product-needs population, and the session-analytics aggregation, ranking, summary and cleanup routines.

= 9.1 - 2026-07-20 =
**Stability release — three fixes worth updating for, one of them urgent.**

* **Fixed: a fatal error that could break logging in.** On sites using the identity/attribution layer, the `wp_login` handler called an internal helper it wasn't allowed to reach, which raised a PHP fatal during sign-in — affecting the standard login form, "My account", and passwordless/magic-link sign-in. If you were seeing 500s on login, this is the fix.
* **Fixed: AI credit balance over-reported when you held a top-up.** The remaining balance added your top-up on top of the monthly cap, but the cap already includes it — so the figure could read as much as double. This under-fired the low-balance alert and let the assistant hit its limit while the meter still showed credit. The credit meter now reads "incl. $X top-up" rather than "+ $X" to match how the cap is actually composed.
* **Removed a latent fatal on the paid-order path.** The Meta CAPI purchase-event builder contained an unreachable branch that would have raised the same class of fatal as the login bug if ever taken. Removed rather than left as a landmine.

= 9.0 - 2026-07-20 =
**The plugin is now Rooster One.**

* **New name.** "AI eShop Optimizer" is now **Rooster One** (the front-end companion is "Rooster One — Runtime"). Only the display name changes: your settings, data, shortcodes and block names are all untouched, and updating is a normal plugin update with nothing to reconfigure.
* **One checkout newsletter opt-in instead of two.** A single box now registers new subscribers, with per-list control for shop managers, and customers manage newsletter and offers independently from their account.
* **Tidier checkout birthday field** — day, month and year sit on one row with a full-width explanatory note and a configurable highlight colour.
* **Accessibility fixes** — corrected ARIA usage on rating stars and gave promo and product-card links proper accessible names.
* **Faster perceived loading on category, page and blog pages** — the above-the-fold hero image is now prioritised, improving Largest Contentful Paint. Below-the-fold heroes stay lazy.

= 8.7 - 2026-07-13 =
**Block-library discoverability, plus a clearer block name.**

* **More native blocks now surface in the block editor and on the plugin page.** Recommendations, Product Slider and Product Variations Gallery gained a block-editor registration (they were front-end-render-only before), so they now appear in the inserter with a labelled placeholder and are listed among the blocks this plugin provides. Their front-end output is unchanged.
* **The full block library is documented** in the plugin description — brand, product, local-business (Google Reviews, Store Locator / Map, Opening Hours, Business Info…), content and archive blocks, grouped by purpose.
* **"Post Related Categories" is now "Post Related Product Categories"** to make clear it lists related WooCommerce product categories, not blog categories.

= 8.6 - 2026-07-13 =
**Your admin chat now fixes SEO for you — plus Google Search Console, backlink & disavow tools, a sharper and more relevant storefront assistant, lower AI/embedding costs, and a faster engine that shrugs off aggressive crawlers.**

* **Sales predictor rebuilt to run in seconds, not minutes.** The backtest accuracy step and the per-batch variation build joined the full order-line history on a computed key (`COALESCE(variation_id, product_id)`) that no index could serve, forcing MariaDB into full×full block-nested-loop scans of ~2–5 billion row-pairs per run (300–500s each). Order-line analytics now carry an indexed `effective_pid` column, the backtest is pre-aggregated once instead of a correlated per-row subquery, and every freshly-rebuilt staging table is `ANALYZE`d before it is joined — so the optimiser always picks an indexed nested-loop. Output is byte-for-byte identical (verified across every history row on live data); the nightly job just stops churning the database into swap.
* **Same fix applied across the physical-recovery and monolithic predictor paths.** The five stock-recovery-outcome joins and the legacy monolithic predictor now use the indexed `effective_pid` too.
* **Customer cumulative order-stats no longer stall.** The per-customer lifetime spend/items rollup was a `customeremail` self-join that flipped to a quadratic multi-minute scan whenever the underlying order table had just been rebuilt (stale statistics). It is now a single pre-aggregate pass — structurally impossible to flip — with fresh statistics forced before it runs.
* **Product Data Prep (vitals) rebuilt for speed and stability.** The nightly Data Prep run that computes every product's vitals — the metrics behind recommendations, badges, swatches, archives and analytics — could flip into multi-hundred-second full-table scans right after a staging table was rebuilt, because stale table statistics made MariaDB mis-plan the joins (the classic "n_rows reads as ~1" trap). Every vitals stage now refreshes its statistics and pins the correct index with typed join keys before it joins, so it stays on a fast indexed path; a built-in circuit breaker caps any single query's temp-table size and run time, and a plan-flip detector flags a regressing stage instead of letting it churn the database into swap. Identical output, a fraction of the time — and no more midnight swap spikes on large catalogues.

* **Sitemap & robots.txt scheme fix.** The XML sitemap and managed robots.txt are built offline (cron / WP-CLI), where WordPress cannot detect that the live request is HTTPS. On a site served over https but whose stored WordPress Address is http:// (the classic Cloudflare "Flexible" SSL / http-origin proxy setup), every sitemap `<loc>`, image URL and the robots.txt `Sitemap:` line could be written as http:// — so search engines were handed http canonicals for an https site. Every same-site URL emitted by the sitemap and robots.txt is now normalised to https (overridable via the new `Rooster One_seo_sitemap_scheme` filter for a genuinely http-only origin).

* **SEO Auto-Fix Assistant, in your admin chat.** Ask the Rooster One Insights chat to "fix my top pages" and it now works in two tiers, free before paid. **Free (no AI credits):** it sets the canonical URL and fills the focus keyphrase from the page's own top-ranking Google keyword — structural fixes that need no copywriting, applied instantly and re-scored, with one-click undo; it can also clear an accidental noindex on request. **AI credits:** the content-writing fixes — a SERP-aware SEO title + meta description, descriptive alt text for images missing it, and richer body content (drafted for review; approving saves a WordPress revision so you can roll back) — are written by the AI, drafted for your review by default. The assistant always tries the free fixes first and tells you the credit cost before writing across more than a few pages. A nightly free Autopilot can keep the structural fixes flowing (off by default, opt-in).

* **Google Search Console — your true traffic (new).** Connect Search Console (SEO → Search Queries) and see the real queries and pages that bring you Google organic clicks, impressions, CTR and average position — straight from Google — beside the DataForSEO ranked-keyword view. High impressions with low CTR flag a title/description the AI can rewrite.

* **Backlinks & toxic-link disavow (new).** SEO → Backlinks pulls your referring domains and their spam score from DataForSEO, flags the toxic ones, and generates a ready-to-upload Google disavow file — kept in sync as new bad links appear. (Google provides no API to submit a disavow, so you upload the file once at the Search Console Disavow Tool; we link you straight there.)

* **Content ideas from your customers (new).** The questions shoppers ask your storefront AI that it answers poorly — no matching products, or a low rating — are distilled into a demand-ranked list of content gaps, so you know exactly what to write next. Your customer assistant only surfaces the signal; it never changes your site.

* **Storefront AI assistant — more relevant answers, fewer wrong turns.** The product cards shown alongside a chat answer are now always tied to what the shopper actually asked, with a relevant-product fallback so the assistant never pads a reply with off-topic links. It understands your own Table Rate Shipping rules when answering delivery questions, and a configurable recency boost lets newer arrivals win when a shopper asks "what's new" or browses a fast-moving category (set your "new product" window under Merchandising → Badges). Answers also run to full length by default for more complete replies.

* **Lower AI costs — the semantic index only embeds what changed.** Building your recommendation & search index now embeds only the products, posts and pages that are new or have changed since the last run, instead of re-embedding the whole catalogue every time — a large saving on embedding spend for big or frequently-updated stores. (Switching the embedding model still rebuilds everything, as it must.) Product text is read from the pre-computed product vitals first and only reaches into the full content for the description, so each run is faster too — and the automatic nightly re-embed schedule now runs reliably.

* **Faster and more resilient under heavy crawling.** A few storefront helpers used to make a small uncached background request on every page view — the swatch add-to-cart nonce refresh, recommendation-impression logging, and the free-shipping progress bar's cart check. Under an aggressive SEO crawler those could multiply into a needless server-load spike. They now fire only on genuine shopper interaction (or only when there is actually a cart to sync), and automated JS-rendering crawlers are skipped outright — no change to what shoppers see or do, just no wasted load from bots.

* **Cookie scanner: off by default, on demand instead.** The consent banner's live per-visitor cookie-discovery sweep is now off by default. Your cookie & third-party-service inventory is built from the built-in database plus the on-demand "Re-scan storefront now" button (Consent → Cookie inventory), which loads your key pages in the background whenever you add a new service — so nothing scans on every visitor. Continuous live discovery can be switched back on any time.

= 8.5 - 2026-07-05 =
**SEO grows beyond the shop: site profiles for content & catalogue sites, Google-data-driven AI titles, conversion goals, campaign & exit-page analytics, and complete attribution in your order and form emails.**

* **Site profiles (new).** Tell Rooster One what your site IS — shop, catalogue (products presented as content, without checkout), or content/publisher — or let it auto-detect. Every SEO metric adapts: opportunity scoring, pillar pages and demand now work properly on content and catalogue sites instead of assuming a shop.
* **Content vitals (new).** The per-product health metrics gain a content twin: every post, page and custom type gets daily reach, engagement, freshness and demand scores — including reader time-of-day and day-of-month consumption patterns, the same lens the shop side has for buyers.
* **DataForSEO integration (new).** Connect a DataForSEO account per site (SEO → General) and Rooster One pulls a weekly snapshot of every Google keyword you rank for, computes striking-distance opportunities (positions 8–20 by search volume) and shows them on the Opportunities card — under a monthly spend cap you control.
* **AI titles & descriptions with live SERP context (new).** A nightly queue drafts new SEO titles and descriptions for your highest-ROI pages using the actual Google results for the target keyword — written to win the click against the competitors really shown there. Drafts wait for approval on SEO → Health, or switch on Autopilot.
* **Conversion goals (new).** Choose which Gravity Forms (plus the Newsletter plugin) count as conversions per site. Rooster One's AI reads each form and derives its goal context, which feeds the SEO descriptions of the pages hosting that form — and goal conversions flow into content demand and the new campaign analytics.
* **Campaign attribution in form notification emails (new).** Gravity Forms staff notifications can include the full campaign story — channel, all five utm parameters, landing page and original referrer — with no hidden form fields or per-site code snippets. Visitor autoresponders are never touched, utm form fields auto-prefill, and the page URL sent to HubSpot is cleaned of tracking parameters.
* **Order attribution emails, completed.** The "Order origin & attribution" block in staff new-order emails now always lists all five utm parameters — and it now also appears on orders paid by cheque, bank transfer or COD, which previously missed it on speed-optimised checkouts.
* **Landing pages & campaigns, canonicalised (new).** Session analytics now parse every visitor's landing page into a clean path plus utm parameters (per-click junk such as fbclid is dropped), with a durable per-day campaign × landing-page rollup: sessions, cart adds and goal conversions per campaign.
* **Exit pages (new).** See where sessions end, split by whether the visitor converted first — separating natural end-of-journey pages from the pages that bleed visitors.
* **Ask the insights chat.** New chat skills: ranked keywords, the striking-distance list, the content-vitals leaderboard, landing-page campaigns and exit pages.
* **Redirect import safeguards.** Imports now verify that every redirect target exists on THIS site and refuse any rule that would create a redirect loop at any depth.
* **Cookie consent: position the floating button per device.** The floating "Cookie settings" button can now be placed Left, Centre or Right with exact pixel offsets from the edge and the bottom — separately for desktop and mobile — so it aligns cleanly with other floating widgets (chat bubbles, scroll-to-top). When the Side Cart bottom navigator is active, its coordinated styling automatically takes precedence on mobile.
* **Search Console fixes.** Paginated pages emit correct self-canonicals and sensible robots defaults, addressing "Alternative page with proper canonical tag" and "Duplicate without user-selected canonical" warnings on content sites.

= 8.4 - 2026-07-04 =
**A media-library cleanup tool, a per-user landing page that can resume where you left off, an admin usage dashboard, a managed robots.txt, and more resilient background jobs.**

* **Media Cleanup (new).** A Tools & Settings tool that reclaims disk space by finding and removing image files your site no longer needs — thumbnail sizes your current theme doesn't register, true orphans with no media-library record, and images left behind by products you deleted. It scans in resumable batches (built for libraries with hundreds of thousands of files), moves everything it flags to a recoverable quarantine first, and only deletes for good when you choose to empty the quarantine — with removing the matching media-library records kept as a separate, off-by-default opt-in. A file is only ever touched when nothing on the site references it anywhere — product galleries, variation swatches, brand logos, page/post content, widgets, menus and theme options are all checked, WebP and AVIF included — so an image still in use is never removed.
* **Choose where you land — or pick up where you left off.** A new My Settings card lets each user set which e-shop Manager card the page opens on, instead of always landing on the same default. Pick any card, or choose "continue where I left off" and Rooster One returns you to the last card you were working in.
* **Admin usage dashboard (new, administrators only).** A Tools & Settings panel, visible only to site administrators, that reports how the Rooster One admin is actually used — page views, active users, sessions and most-opened cards — in total and per user, over a time window you select. Lightweight, self-pruning (kept for 180 days), and never shown to non-admins.
* **Managed robots.txt (new).** The built-in SEO engine can now manage your robots.txt alongside the XML sitemap: it serves a correct, sitemap-referencing robots.txt (honouring "Discourage search engines"), lets you add your own custom rules from SEO → Redirects, and writes a static file at the web root so your server can serve it directly. It only ever acts when Rooster One SEO is switched on and no other SEO plugin (Yoast, Rank Math, AIOSEO) is handling robots — and it never overwrites a robots.txt it didn't create.
* **More reliable background jobs.** The protection that stops a mis-behaving recurring task from piling up thousands of duplicate scheduled actions now covers the full set of AutomateWoo jobs and WPForms' spam-purge and form-locator tasks — not just log cleanup — so low-traffic sites keep a clean, fast Action Scheduler queue.
* **Fixes & polish.** The image picker on the SEO → Schema and Social cards now opens reliably (it previously failed to attach on pages where the media library loaded late). Greek translations refreshed, including the Amazon Selling-Partner catalogue and order-import strings.

= 8.3 - 2026-06-26 =
**One-click product import from your marketplaces, an AI-chat analytics dashboard, and a single unified admin navigation.**

* **Catalogue Importer (new) — import your products from eFood, Etsy, Wolt and Amazon.** The mirror image of the marketplace catalogue exports: enter your marketplace API keys, choose a source, and Rooster One recreates the products in your store with one click — auto-building the category tree, product attributes and food option-groups each product references, sideloading its images, and matching on SKU so a re-run updates products in place instead of duplicating them. Imports as Draft + new-only by default (each a per-run toggle, alongside Create + Update and Update-only). A new **Enrich** mode fills gaps on existing products without overwriting anything you already have — so you can, for example, create products from Wolt (for their ingredient / topping option-groups) and then enrich from eFood or Amazon to fill in barcodes. Amazon reads your own Seller listings through the Selling Partner API (no extra AWS keys needed); eFood, Etsy and Wolt use their catalogue APIs.
* **AI Chat Analytics (new, Pro).** A Customer-Profiling dashboard that turns your AI chat history into insight: a searchable conversation log plus aggregate metrics — which page each conversation was opened from (read from the existing Session Tracker, not a second tracker), question volume and topics, the satisfaction ratings customers leave, and chat-assisted conversions (orders that followed a chat, precomputed and cached the same way Competition conversions are — never calculated live on page load). Conversation-history retention is configurable, 90 days by default.
* **Unified admin navigation.** The three Rooster One admin pages — Analytics & Shop Recommendations, e-shop Manager and AI Chat — now share a single menu bar that highlights the section you're in, replacing the old top tab-strip and the separate per-page tables of contents. New "Set Up" and "AI Chat" menu groups deep-link straight to each page's individual cards, so everything is one click away from anywhere.
* **Quick Navigator finds features by what they do.** The Ctrl/Cmd-K Quick Navigator now matches synonyms and capability terms as well as names — so "amazon", "barcodes" or "import" jump to the Catalogue Importer and "happiness" or "sentiment" to AI Chat Analytics — and cross-page results now show the correct section badge.
* **Fixes & polish.** The SEO → Redirects "Rebuild SEO index" card now remembers the object types you last rebuilt (Posts / Pages / Products / Attributes as well as the taxonomies) and pre-ticks them on your next visit, instead of always resetting to the terms-only default.

= Earlier versions =

8.2 and earlier are listed in changelog.txt, which ships with the plugin.

== Upgrade Notice ==

= 10.0 =
Recommended for everyone. Adds a searchable index of every screen in the plugin (Ctrl+K from anywhere), a written description on every page and tab, and a site-profile badge in the header showing whether Rooster One reads your site as a shop, a catalogue or a content site. All source strings are now English with the Greek preserved as translations, so nothing your customers see changes. Also fixes a bug where the AI settings form could still store OpenAI — a provider dropped in May — and corrects a misleading AI-credits message that sent operators to re-check a connector that was already working.
= 9.5 =
Recommended for everyone, and important if you run on multisite or host several shops on one server. Updating or deactivating no longer drops any database table — a network deactivation previously discarded twelve working tables plus your live sessions and session archive, and two schema migrations could empty the purchase-history rollup or your stored survey responses on update. Report windows such as "this month" now follow the timezone in Settings → General rather than the server clock, so figures no longer shift when your host is in a different timezone from your shop. Also prevents a single marketplace order being imported as two WooCommerce orders. Recommendation caches are cleared once on upgrade, so expect a brief cache-miss on product pages immediately afterwards.

= 9.2 =
Recommended if your site has ever been restored, migrated or cloned. Database backups omit stored routines by default, which could leave the surveys, web-push, product-needs and session-analytics jobs failing every night with "PROCEDURE … does not exist" — permanently, since reactivating the plugin did not rebuild them. Those jobs now detect and repair their own routines, with no added cost on storefront requests.

= 9.1 =
Recommended for everyone. Fixes a PHP fatal that could break sign-in (login form, My account, and magic-link) on sites using the identity/attribution layer, corrects an AI credit balance that over-reported when a top-up was held, and removes a latent fatal on the paid-order path.

= 9.0 =
The plugin is now called Rooster One. Display name only — settings, data, shortcodes and block names are unchanged, and there is nothing to reconfigure. Also: one unified checkout newsletter opt-in instead of two, a tidier birthday field, accessibility fixes on ratings and promo links, and faster Largest Contentful Paint on category, page and blog heroes.

= 8.7 =
Makes more of Rooster One's native blocks (Recommendations, Product Slider, Product Variations Gallery) discoverable in the block editor and on the plugin page, documents the full block library, and clarifies the "Post Related Product Categories" block name. No front-end changes.

= 8.6 =
New: an in-chat SEO Auto-Fix Assistant with Google Search Console plus backlinks & disavow, a sharper and more relevant storefront assistant, and lower embedding costs. Much faster nightly Data Prep, vitals and analytics queries — no more billion-row scans or midnight swap spikes — and more resilient under heavy crawling. Note: the consent cookie scanner now defaults to off — rebuild the inventory on demand via "Re-scan storefront now".
