=== AI eShop Optimizer ===
Contributors: oxfordmetadata
Tags: ai-chat, content-recommendations, embeddings, conversational-ai, analytics
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 8.0
Woocommerce tested up to: 10.9
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

AI suite for WooCommerce & WordPress: chat, recommendations, SEO, attribution, merchandising, fulfilment. Anthropic & Voyage AI.

== Description ==
# AI eShop Optimizer — the unified AI commerce suite for WordPress & WooCommerce

AI eShop Optimizer turns your site into an adaptive, self-optimising storefront. One plugin does the work of a whole stack of subscriptions — an AI assistant, product recommendations, a complete in-house SEO engine, first-party measurement and consent, pricing and merchandising, fulfilment and operations, customer intelligence, and plain-language analytics — powered by the latest models from **Anthropic Claude** and **OpenAI**, with **Voyage AI** embeddings for semantic search.

Its guiding principle is **unification of experiences and functionality**: every storefront surface shares the same design tokens, containers and controls; every report reads from one canonical source of truth; and the heavy lifting is pre-computed into materialised tables and served by a thin front-end runtime — so each feature adds capability, not milliseconds.

**Works with or without WooCommerce** — perfect for:
- WooCommerce stores that want recommendations, merchandising, SEO, fulfilment and attribution in one place
- Corporate and content sites that want an intelligent, on-brand chat assistant
- Merchant and information sites that need AI-powered customer support

You can adopt it one capability at a time. Almost everything ships **off by default** and runs **alongside** your existing tools (your current SEO plugin, your pixel manager, your CMP) until you choose to switch each piece on — so installing changes nothing until you flip a toggle.

== Features ==

### Conversational AI & semantic search
- A floating, fully themeable chat widget backed by the latest **Anthropic Claude** and **OpenAI** chat models (the model list is registry-driven and stays current).
- Semantic product and content search powered by **Voyage AI** / OpenAI embeddings — shoppers find products by meaning, not just keywords.
- Context-aware answers that draw on the product catalogue, customer behaviour and your own content; customisable templates per use case (commerce, support, content).
- Works equally on a content/corporate site (assistant only) or a full WooCommerce store (assistant + recommendations).

### AI product recommendations
- Graph-database-powered up-sell / cross-sell pairings from your real sales patterns (the optional service at eshop-optimizer.com), importable with one click — or import any recommendations from a CSV in our format.
- **Products for the same need** — surfaces alternatives that satisfy the same customer need (via your need taxonomy), ranked by pre-computed sales performance, de-duplicated against your up-sells and cross-sells.
- **Recommendation rails, ordered your way** — drag-and-drop ordering of every rail (Up-sells, Cross-sells, Related, Recently Viewed, Same-need) with per-rail show/hide, on both block (FSE) and classic themes.
- **Custom slots** between the rails — drop in rich HTML/WooCommerce shortcodes or a Tolstoy video-shopping widget, each with its own heading.
- Built-in performance tracking with Google UTM tags and a recommendation-lift report, so you can see the incremental orders and revenue the engine adds over each traffic channel.

### In-house SEO engine (a faster, Greek-aware AIOSEO/Yoast replacement)
- A complete on-page engine — title, meta description, canonical, robots, Open Graph, Twitter and JSON-LD — built once into a head cache and served by the thin runtime in a single cached read (near-zero added TTFB, no per-request assembly, no telemetry).
- **Rich commerce schema**, all vitals-driven (never live queries): variable products emit `ProductGroup` + `hasVariant`/`variesBy`; real per-variant **colour** mapped from your own swatch attributes; `gtin`, brand, sale-price strikethrough, and operator-configured `OfferShippingDetails` + `MerchantReturnPolicy` on every Offer. Category, brand and tag archives emit `CollectionPage` + `ItemList` + `BreadcrumbList`.
- **Local SEO** — a `LocalBusiness` node per physical store (hours, geo, price range, image, Maps links) with Store Locator / Opening Hours / Business Info blocks and an optional store-page post type.
- **Image SEO** (auto-fills only empty alt text), a **redirects engine** with an automatic slug monitor and a unique-404 list, and a **static, outage-proof sitemap** (served as files even if the plugin is off).
- A live **0–100 SEO score** and health dashboard, one-click **Claude AI Assist** for titles/descriptions/keyphrases, **EU Omnibus** lowest-price history, multilingual head + hreflang (WPML / Polylang / TranslatePress), and a read-only **AIOSEO importer** with a head-parity verify before you cut over.

### Measurement, consent & attribution
- **First-party, server-side measurement** you own end to end: Meta Pixel + Conversions API, GA4 + Measurement Protocol, Google Ads (browser + server-side Enhanced Conversions), and TikTok Pixel + Events API — deduplicated on a shared event id, sent after the order is saved for zero checkout latency. Each platform is independently selectable, so you can keep the tools you already run.
- **Advertiser-grade match quality** — Facebook Advanced Matching, complete GA4 user-data (Unicode-correct for Greek), a built-in Google tag / GTM loader, and consent carried on every server event.
- **Consent / GDPR CMP** — a lightweight, first-party cookie-consent banner (no external CMP): rich message, Accept / Decline / Customize with a per-category preferences panel, per-button theming, two layouts, a re-openable "Cookie settings" control and policy-version re-prompting. It drives Google Consent Mode v2 and gates AIEO analytics and every ad sender, and includes a cookie scanner that classifies the services your storefront sets.
- **ROI Wizard & UTM Explorer** — one cockpit for "what actually drove the sale": pick a type (recommendation engine, offer, channel, campaign, creative), a value and a period, and see orders, revenue, cost, ROAS and ROI %, with period-over-period comparison. A cascading UTM drill-down (Source → Medium → Campaign → Term → Content) and a friendly Channel dimension keep paid and organic cleanly separated.
- **Ad-spend ledger + connectors** — enter spend, bulk-import a CSV, or connect Google Ads / Meta / TikTok to pull campaign spend nightly, so ROI becomes automatic. One canonical source of truth for each order's revenue and marketing channel ties it all together.
- **Session × attribution analytics** — engagement (scroll/time/activity) joined to conversion through one session id; blog-post attribution; abandoned-cart and cart-removal analysis; rating- and need-vs-conversion correlation — pre-aggregated for millisecond reports.

### Merchandising, pricing & product display
- **Pricing engine** with per-role price overrides (CSV), time-windowed brand discounts and loyalty classes, stacked so each customer always sees the strongest applicable price.
- **Offers** — brand free-gift thresholds, free-shipping rules, product/category/brand/need targeting with proper exclusion vetoes, and configurable exit-intent.
- **Product swatches** — image / button / colour swatches with per-variation descriptions, multi-select, and an "AIEO colour context" flag that turns any swatch attribute into a real product colour for schema and feeds.
- **Product display, your way** — a drag-and-drop layout builder for the whole product info column (block + classic themes), renamable Custom Tabs with drag-and-drop tab ordering, Product Needs as list or pills, trust badges, payment logos, and a master Button Styles control (colours, padding, sizing, glass) that every storefront button inherits.

### Cart, checkout & wishlist
- A floating **side / mini-cart** with "you might like" recommendations and a **free-shipping progress bar**, plus a **sticky add-to-cart** bar on product pages.
- **Saved & abandoned carts** — shoppers save, share and resume carts (cookieless share-restore that survives CDN/edge caching), and a permanent abandoned-cart log with outcomes feeds recovery.
- **Wishlist** with analytics, and a **"notify me when back in stock"** waitlist with automatic stock-watcher emails.
- Full **WooCommerce block cart & checkout parity** via the WordPress Interactivity API — every surface works identically on block-based and classic shortcode cart/checkout.

### Fulfilment & operations
- **Marketplace order importer** — orders from Skroutz, Shopflix and eMAG flow into WooCommerce as native orders, so stock, attribution, customer profiles and fulfilment stay unified; per-vendor rotatable webhook tokens and configurable SKU lookup.
- **Streaming feed generator** (XML / CSV) for large catalogues, with Google / Skroutz / BestPrice / Shopflix / Meta / Google-Local templates and a reusable product/variation picker.
- **Shipment tracking** for Greek & Cypriot couriers, **courier fulfilment drivers** (BoxNow, Courier Center and more — vouchers, labels, COD, tracking), **COD and payment-method gating** by destination country or chosen courier, and delivery economics that compute a real break-even free-shipping threshold from your carrier costs and margin.
- **Operational intelligence** — Physical-Demand Stock Recovery (auto-restock products the stores still sell), Missing Hot Sellers (in-store best-sellers not yet live online), a self-tuning sales / out-of-stock predictor, and a physical-store stock / supplier / preorder system — all reading from one materialised data layer, with optional ERP integration.

### Built for the Greek & Cypriot market
First-class support for the couriers, marketplaces and payment habits Greek shoppers actually use — not generic US/UK defaults.

- **Greek courier fulfilment drivers.** Issue vouchers, print labels, set COD and track shipments straight from the order for **ACS**, **BoxNow**, **Courier Center**, **ELTA Courier**, **Geniki Taxydromiki** and **Speedex** — plus a **Custom** driver for any other carrier. Bulk voucher printing, daily courier closings and per-courier documents are built in.
- **Greek marketplace order import.** Orders from **Skroutz**, **Shopflix** and **eMAG** arrive in WooCommerce as native orders, so stock, attribution, customer profiles and fulfilment stay unified — with per-vendor rotatable webhook tokens and configurable SKU lookup.
- **Greek marketplace product feeds.** Ready-made, streaming XML / CSV feeds for **Skroutz**, **BestPrice**, **Shopflix** and **eMAG**, alongside **Google Shopping**, **Google Local**, **Meta (Facebook) catalog** and **Tolstoy** — built to handle 35k-product catalogues.
- **Cash on Delivery, the Greek way.** Enable or disable **COD** by destination country (e.g. on for Greece, off for Cyprus) or by the chosen courier (e.g. no COD when Box Now is selected), live on both classic and block checkout — and disable any payment method by country too.
- **Honest shipping from the first click.** A postcode-less cart shows the real minimum carrier rate ("Carrier (από X,XX €)") instead of a placeholder that looks free, and a margin-aware calculator sets your free-shipping threshold from real courier costs.
- **Greek-native end to end.** A complete Greek admin + storefront translation, and a Greek-aware in-house SEO engine (titles, meta, schema and one-click AI Assist).

### Customer intelligence & engagement
- An **omnichannel customer view** (eshop + in-store) as a single source of truth, with behavioural segments (top, lost, lookalike, abandoned-cart, reactivation).
- **Triggered web-push** flows (welcome, reactivation, price-drop, back-in-stock) with a full dispatch log and click attribution.
- **Customer survey intelligence** (Gravity Forms ingest, NPS / satisfaction / priorities / discovery / gift / profile metrics and a composite VoC score).
- **Star ratings** with `AggregateRating` schema (native, or bridged into AIOSEO / Yoast / RankMath) so reviews show as Google rich results.

### Insights Chat & analytics
- **Insights Chat** — ask your shop questions in plain language from inside wp-admin, powered by the Claude key you already have and dozens of purpose-built data abilities (orders, products, attribution, recommendations, ratings, blog engagement, customer profiles). No third-party BI subscription, no data export.
- **Advanced session analytics** — custom class-based event tracking, click throttling, image-click tracking, duplicate-event protection and aggressive cache-busting, compatible with Nginx, Varnish, Redis, WP Rocket and Cloudflare.
- **Insights remote-DB streaming (Pro)** — stream raw analytics to your own operator-owned MariaDB / MySQL for unbounded BI, reusing the encrypted ERP connection registry, with a local-purge failsafe so nothing is deleted until the remote confirms receipt.

### Built for speed
- The expensive work (catalogue vitals, SEO head, sitemap, swatch caches, analytics rollups) is pre-computed on a schedule into flat tables; the storefront reads single, cached rows.
- A thin **front-end runtime plugin** serves the storefront features, SEO head, sitemap and redirects even when the admin plugin is trimmed from a request, and a build step ships **minified CSS/JS** for every asset across both plugins.

== Privacy & the recommendations service ==
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/category names and prices with limited impact on quality, and withhold customer IDs for anonymity. Our company, Oxford Metadata Ltd, maintains privacy provisions approved by both Google and Facebook — see https://eshop-optimizer.com/compliance.

== How to Use ==

- **Export & back up your current pairings.** Safely export existing up-sells and cross-sells (a reliable back-up); the Pro version factors your current selections into the AI's output.
- **Accelerated order export (HPOS).** Export up to 100,000 order items (Pro lifts the cap), excluding titles/prices or customer IDs at will, with optional seasonal analysis.
- **Refine your data with our AI engine.** Register at eshop-optimizer.com and submit your data to receive refined up-sell / cross-sell strategies for your leading products (full-catalogue analysis in Pro).
- **Import tailored strategies.** Apply the AI-crafted suggestions via a simple CSV upload.
- **Watch sales grow.** Measure the lift with the built-in ROI Wizard and UTM tracking — and we offer a free initial analysis, because we're confident you'll want more.

For any queries or support, contact us at [support@eshop-optimizer.com](mailto:support@eshop-optimizer.com).

---
Website: (https://eshop-optimizer.com)

== Installation ==

Extract the contents of this plugin zip file into your wp-content/plugins/ directory locally.
Upload the extracted folder to your website.
Navigate to wp-admin/plugins.php on your dashboard.
Find 'AI eShop Optimizer' and activate the plugin.
Alternatively, install directly through WordPress:

Go to the 'Plugins' menu in WordPress.
Click 'Add New' and search for 'AI eShop Optimizer.'
Install and activate directly from your dashboard.

== Changelog ==

= 8.0 "Fable / Mythos 5" - 2026-06-14 =
**Refactored with Anthropic's Fable / Mythos 5. Marketplace-feed URLs refined, plus a proper attribute-driven product-colour pipeline for SEO and feeds.**

* **Absolute marketplace-feed links.** Products with an SEO canonical were being exported with a relative `<g:link>` (no domain), so Google / Skroutz silently dropped them. The catalogue build now absolutises the canonical into the core-vitals product URL, with a defensive absolutise at feed output (the sitemap and the on-page canonical tag were already correct).
* **Product colour from your attributes.** A new "AIEO colour context" flag (Products → Attributes, with a one-click bulk action) marks which swatch attributes represent a colour; the catalogue build then reads the term NAME (e.g. "French Caramel") into the product colour used by the JSON-LD schema and the marketplace feeds — real per-variant values, not slugs. Replaces the old title-guess heuristic and completes the 7.4 colour follow-up (parents stay clean: Google carries colour on each variant + `variesBy:color`).

= 7.4 - 2026-06-12 =
**Merchant-listing & Local SEO schema completeness — clear Google Search Console's "missing field" warnings across Product and LocalBusiness, plus a clean Channel view for attribution. Requires WordPress 7.0+.**

* **Product `color` on every product.** The Product / ProductGroup schema now always emits `color`, read from the core vitals colour — real per-variant values on variable products, present-but-empty on simple products until you map a colour-denoting attribute (a guided follow-up; see `documentation/SEO_SCHEMA_NEXT_OPTIMIZATIONS.md`).
* **Shipping & returns on every Offer.** New SEO → Schema settings emit `OfferShippingDetails` + `MerchantReturnPolicy` on each product Offer — return window + free-returns flag, shipping rate, handling/transit days, country — off until you enter your real terms (inaccurate values trigger Merchant Center issues).
* **`productGroupID` length handling.** Variable products with a long slug-style SKU now stay within Google's "invalid string length" limit — the group id falls back to the stable product ID (≤50 chars).
* **LocalBusiness `priceRange` + `image` per store.** The Locations & Reviews editor gains a Google price-tier selector (€…€€€€) and a media-gallery image picker; both flow into each store's `LocalBusiness` node, clearing the "missing image / priceRange" warnings.
* **UTM Explorer — Channel dimension.** A new top-level "Channel" breakdown (the resolved marketing channel) with consolidated, friendly labels — Google – Paid cleanly separated from Organic Search, plus Facebook – Paid, Direct, Skroutz, etc. The Source view also splits paid Google out of the organic `google` bucket.
* **Attribution accuracy.** Order analytics now bucket by the site's configured timezone (matching WooCommerce Analytics day-for-day), and self-referral ("internal") folds into "(direct)".

= 7.3 - 2026-06-10 =
**In-house SEO engine — a faster, Greek-aware replacement for AIOSEO/Yoast: rich commerce + local-business schema, image SEO, redirects and a static sitemap, all served from materialized data at ~0 ms. It runs behind your current SEO plugin until you flip the switch, so installing 7.3 changes nothing until you cut over.**

* **AIEO SEO module (new).** A complete on-page engine — title / meta description / canonical / robots / Open Graph / Twitter + JSON-LD — built once into a head cache and served by the thin runtime in a single cached read (no per-request assembly, no Vue admin, no telemetry; ~0 ms added TTFB vs the 100–300 ms a competitor adds). Augment-only behind an existing SEO plugin until enabled.
* **Canonical-category control.** Pin one canonical category per product (AIOSEO's "primary category"); a single resolver drives the permalink, the `<link rel=canonical>` and the sitemap entry together. Editor "SEO" metabox + a chunked bulk "set for all products" tool.
* **Rich commerce schema (all vitals-driven, never live Woo queries).** Variable products emit `ProductGroup` + `hasVariant`/`variesBy` (Google no longer collapses them to a single collapsed item); sale prices carry a `UnitPriceSpecification` strikethrough; plus `gtin`, brand, and operator-configured `MerchantReturnPolicy` / `OfferShippingDetails`. Category, brand and tag archives emit `CollectionPage` + a product `ItemList` + `BreadcrumbList` + `inLanguage`.
* **Local SEO (multi-store).** A `LocalBusiness` node per physical store (from your Locations & Reviews / Google locations) — opening hours, geo, Maps/Rate links — under the Organization graph, with one location pinned as HQ. New **Store Locator**, **Opening Hours** and **Business Info** blocks (+ shortcodes), and an optional **store-page** post type whose URL base + label you choose (nothing is hardcoded). Store pages get their own sitemap entries.
* **Image SEO.** Auto-fills EMPTY product featured-image alt text from the product title/template (your set alts are preserved) and adds one `<image:image>` per product to the sitemap for Google Images.
* **Redirects + automatic slug monitor.** A full redirects engine: rename a product/post and the old URL keeps working (auto 301), a unique-404 list with one-click "Create redirect", served at the nginx edge with a PHP fallback for portability.
* **Static, outage-proof sitemap.** Cron-built to static `.xml` shards (≤2000 URLs each + an index), served as files — it keeps serving even if the plugin is deactivated.
* **SEO score, health dashboard & AI Assist.** A live 0–100 score + checklist in the editor, a demand-ranked "SEO Health" dashboard, and one-click Claude AI Assist (generate/improve title, meta description, summary, keyphrases) — Greek-native.
* **AIOSEO → AIEO migration + pre-cutover verify.** A read-only importer copies your entire AIOSEO configuration (per-object meta, global settings, image-alt format, redirects) with a mapping report — and STRIPS deprecated FAQPage/HowTo schema. A one-click **head-parity verify** compares the head AIEO would emit to your live head over a sample (title/canonical/robots) before you enable the engine and deactivate AIOSEO.
* **EU Omnibus.** A 30-day-lowest-price history feeding the compliant reference price.
* **Multilingual.** Per-language head + hreflang for WPML/Polylang; a TranslatePress-aware sitemap.
* **Core vitals carry the canonical.** Each product's stored URL in the core vitals table is now its SEO canonical (where one exists), so feeds and on-page agree; the field is bounded (300 chars) so an over-long canonical is safely truncated and the catalogue build stays unaffected.
* **Editor blocks discoverable again.** All AIEO blocks now appear in the inserter regardless of a theme's curated block palette, and every block title is prefixed "AIEO" so they're searchable; product-context blocks stay scoped to product templates.
* **Refinements & runtime.** Retired a legacy product-labels stylesheet that was no longer needed (clearing a 404/MIME response). The thin front-end **runtime plugin moves to its own 1.0 version** and now also serves the SEO head, sitemap and redirects when the core plugin is trimmed from a request.

= 7.2 - 2026-06-09 =
**TikTok conversions, consent carried on every event, runtime-owned measurement, in-request event delivery — plus the searchable ROI Wizard & new UTM Explorer with period comparison**

* **TikTok added to Pixels & Conversions.** Browser TikTok Pixel + server-side Events API (deduplicated, ttclid recovered, consent-gated) — TikTok joins Meta and Google as a fully-owned platform.
* **Consent on every event.** Region-aware Consent Mode v2 defaults plus per-event consent on the server senders (GA4 MP, Google Ads, Meta CAPI Data Processing Options), so a declined category down-scopes the conversion at the ad platform too, not just the browser.
* **Runtime owns measurement.** With the runtime active it serves all three browser pixels and the three server senders itself (even when core is trimmed); core stays fully standalone.
* **Event delivery rebuilt.** Server conversions flush the page first (fastcgi_finish_request) and send in-request instead of via Action Scheduler — zero checkout latency, cron-independent. A "Fire-and-forget" toggle (on by default) frees the worker instantly; turn it off to log each reply.
* **Order origin in staff e-mails.** New-order notifications show the marketplace or the site channel/campaign, from the canonical order-facts source.
* **Ad-connector setup links.** Direct links to where each Google / Meta / TikTok credential is found.
* **UTM Explorer (new).** A cascading drill-down across the five campaign tags — Source → Medium → Campaign → Term → Content — each a searchable multi-select that narrows the next to what actually co-occurred. It lives on the ROI Wizard page and is findable from the admin command palette (search "utm"). The table splits the current selection down by the next level, with orders, revenue and average order value.
* **Searchable multi-select across the whole cockpit.** Every selector in the ROI Wizard and UTM Explorer — the Type, the exact detected value, the five UTM levels and the ad-spend ledger value — now uses the same fast searchable picker as product selection (search, tick several, Done), so choosing from hundreds of creatives or campaigns takes seconds. Type accepts several types at once and stacks one results table per type; Exact spans the union of the chosen dimensions' values.
* **Reco lift per channel.** A new ROI type showing the recommendation engine's incremental orders and € over and above each traffic channel — of the orders Google / Meta / organic brought, what share the recommendations assisted and what they added.
* **Period comparison (both reports).** Compare any result against the previous period or the same period last year, with a green / red Δ% inline on every metric. Off by default.
* **Report polish.** UTM consolidated onto the ROI Wizard page (ROI → UTM → ledger); From / To dates lead each row; top-aligned controls so selecting a value no longer nudges them; the Ad-spend connectors moved into a renamed "Tools & Settings" group; the default range is the last 30 days.

= 7.1 - 2026-06-08 =
**First-party measurement & consent (server-side Facebook Pixel/CAPI + GA4, checkout active/idle timing, a lightweight Consent/GDPR cookie banner) — plus the new ROI Wizard & ad-spend connectors (Google · Meta · TikTok), one canonical order revenue/channel, Custom Tabs and drag-and-drop Product Tab Ordering**

* **Pixels & Conversions (server-side measurement).** AIEO can now own the Facebook (Meta) Pixel and Google Analytics 4 end to end — a thin browser pixel **and** server-side Conversions API / GA4 Measurement Protocol, deduplicated on a shared event id, sent after the order is saved (zero checkout latency). Each platform is selectable (AIEO owns it, or stay out of the way for a tool you already run), with master off-switches so you can keep PixelYourSite. Facebook credentials can be read from PixelYourSite if present.
* **Advertiser-grade match quality (PixelYourSite-Pro parity).** The data your ad partners receive is now on par with a premium pixel plugin: **Facebook browser Advanced Matching** (the shopper's identifiers attached to the browser pixel, hashed client-side, consent-gated) on top of the existing full server-side set; **complete GA4 user-data** (name + address, not just email/phone, Unicode-correct for Greek); a built-in **Google tag** loader (load `gtag.js` — or a Google Tag Manager container — directly from AIEO, wired to Consent Mode v2, so you don't need Site Kit); and **Google Ads conversions with Enhanced Conversions**, both in the browser (`gtag` user-data) and **server-side via the Google Ads API** (keyed on the captured gclid, resilient to ad-blockers). All of it rides the first-party consent gate.
* **Consent / GDPR — first-party CMP.** A lightweight, first-party cookie-consent banner (no external CMP, no IAB TCF bloat) on its own page: a **rich-text message**, **three actions** (Accept all / Decline / Customize) with a per-category preferences panel (necessary / functional / analytics / marketing), **per-button colour theming** (background / text / border + hover, with an equal-prominence guard so Decline can't be hidden), **two layouts** (bottom bar or a centre glass pop-up), a floating **“Cookie settings”** button so visitors can change or withdraw consent, and a **policy-version** field that re-asks everyone after a policy change. It drives Google Consent Mode v2 and gates AIEO analytics plus the Facebook / GA4 senders. A built-in **cookie scanner** classifies the cookies and third-party services your storefront sets (Google Fonts, GA4, the Meta pixel, YouTube, …) against a curated database — populated automatically as visitors browse (no server crawl, names only, never values) — with an inventory you can re-classify.
* **Checkout timing.** Active vs idle time is now measured for each successful checkout and aggregated per product, so offer timing (exit-intent, etc.) can be set from real deliberation data rather than a static delay; coupon-completed orders are tagged and excludable from the baseline.
* **Custom Tabs (Product Display).** Up to five extra product tabs you can switch on and rename at will (e.g. "Application", "Ingredients") — each holds its own rich text per product and the tab simply disappears when a product has no content for it. A one-click migration assistant imports existing content from the legacy Pods "usage" / "specification" fields (auto-enabling and labelling the first two tabs), and the legacy theme tabs are removed automatically so nothing shows twice.
* **Product Tab Ordering.** A new drag-and-drop card on the Product Display dashboard (between the info-column layout and the recommendations order) sets the order of the WooCommerce tabs (Description / Additional information / Reviews) together with your Custom Tabs, in one sequence; tabs a product doesn't have are skipped while the order holds for the rest, on both block (FSE) and classic themes.
* **ROI Wizard — one cockpit for "what actually drove the sale".** A new **Attribution → ROI Wizard**: pick a type (⭐ Recommendation engine, Offer, Channel, Campaign, Creative), the exact detected value, and a period — and see orders, revenue, cost, net, **ROAS** and **ROI %**. AIEO's own contribution is front and centre: recommendation-assisted sales and offer effectiveness (free shipping, gifts, discounts) sit next to marketing channels and campaigns. Revenue is the order AIEO computes; offers carry their real cost automatically (free-shipping uses the courier rate already computed in Fulfillment), and channels/campaigns use the ad spend you enter or sync.
* **Ad-spend ledger + bulk CSV.** A per-period, per-dimension ad-spend ledger backs channel / campaign / creative ROI — enter spend inline, or export a CSV, fill a whole quarter in a spreadsheet, and re-import. Manual entry, CSV and the connectors all land in one place.
* **Ad-spend connectors — Google Ads, Meta, TikTok.** Connect each platform once through a guided credential wizard (with exactly what to ask your ad agency for); AIEO pulls campaign spend nightly into the ledger so ROI becomes automatic — one cockpit for spend and your own recommendation / offer / channel attribution. Credentials are stored encrypted; the pull is read-only.
* **One canonical order revenue + channel.** A single source of truth for each order's revenue and marketing channel, reading from the order AIEO computes, with a documented map of where every order fact lives (including why the WooCommerce total and the ERP invoice total are intentionally different). The offer-effectiveness report now reads the canonical channel, so per-channel offer ROI now attributes orders correctly instead of leaving them "unattributed".
* **Accurate engagement & attribution.** The engagement score is now one canonical formula everywhere; re-delivered tracking beacons now count each add-to-cart total once; the Attribution dashboard's channel back-fill moved off the page render to an hourly background job, and its channel cards use one consistent 7-day window.
* **Storefront & block editor.** Carousels gained an optional "Recos carousel" slider style (pink scroll-progress bar) selectable per block; the Google Reviews block gained a manual swipe-scroll mode; and a WordPress-7 block-editor registration mismatch on AIEO blocks ("Invalid parameter(s): attributes") was resolved by registering the shared responsive / section-header attributes server-side.

= 7.0 - 2026-06-05 =
**Product-page layout builder (block + classic themes), a reusable product/variation picker, and a master Button Styles control — plus side-cart mobile-bar styling (glass, per-icon, bubble), padding/min-max/glass for the master buttons, wishlist & brand in the layout builder, and sticky admin navigation**

* **Side-cart mobile bottom bar.** Theme-independent colours (bar background + height, icon, cart-count number + circle), a glass effect (transparent + backdrop blur), per-option "selected" colours for Navigator / Search / AI Chat / Cart, an optional cart-only floating bubble (like the desktop cart), and refined alignment for the lone-cart badge. The whole side-cart surface also moved to a shared class so the runtime can render it without the admin plugin.
* **Product Needs — Pills.** New tag-style "pills" display alongside the list, with full pill styling (size, radius, padding, gap, colours, border).
* **Master Button Styles — padding, sizing, glass.** Per-group Top/Right/Bottom/Left text padding, min/max width + height, an opt-in glass effect, and full Secondary hover (border + hover background / text / border).
* **Layout builder — Wishlist + Brand.** "Add to Wishlist" is now placeable (Beside image / Beside the product title / Under image), and Brand Display gained the "Beside the product title" option; the builder wins over the per-module Brand position.
* **Admin polish.** Refined the toolbar icon layout; reordered the AI Optimizer submenu (Data Prep → e-shop Manager → AI Chat → Interactivity (IAPI) → Rec Cache) and removed the Session Schema Migrator from the menu; the top bar + e-shop Manager sub-tab navigation are now sticky.

* **Product-page layout builder.** One drag-and-drop "Display Order" list (Storefront Display → Single Product Page) now sets the vertical order of the whole product info column — the core elements (title, rating, short description, sale / free-shipping messages, price, add-to-cart) and the info modules (meta, categories, brand, payment logos, trust badges, waitlist, gifts, complementary, product needs, role-pricing login) — with a per-module "Beside image / Under image" choice. The same order is applied on both block (FSE) themes and classic themes (Botiga / FemmeFatale), so the page looks the same either way. Core blocks that ignore styling and the Brand Display placement now follow the list too.
* **Categories line restored.** The clickable "ΚΑΤΗΓΟΡΙΕΣ" comma-list is back as its own positionable module, styled to match the SKU/Barcode rows; the role-pricing login message is positionable too; and Product Categories now sits next to Product Meta in the menu.
* **Reusable product / variation picker.** A modal browser — pick simple products, whole variable products, or specific variations — replaces the free-text ID/SKU boxes on Product discounts, Free gifts and Free shipping (included and excluded lists), the Product Exchanger and the marketplace feed exporter. Existing selections migrate automatically.
* **Master Button Styles (Tools).** One place sets the default background, text, border and radius (plus hover) for every AIEO storefront button, with separate Primary, Secondary and Archive masters; per-button colour pickers (Waitlist, Complementary, Sticky Add-to-Cart, Side-Cart) inherit the master and override only when set. The side-cart, save/share-cart, coupon-apply and multi-select buttons now follow the master, and the admin colour-picker swatches now render reliably.
* **Admin discoverability.** The Ctrl / ⌘-K navigator indexes the layout card and the Saved & Abandoned Carts report; the AI Insights chat gained an abandoned-carts playbook and feature-location pointers.
* **Auto-restock.** The e-shop's own sales (a distinct ERP invoice type) are excluded from physical-store demand so restocks stay accurate; out-of-stock cancellations now surface in the Stock Recovery Unsuccessful-Restocks KPI.

For brevity, only recent releases are shown here. The complete version history (back to 1.0) is bundled with the plugin in changelog.txt.
