# Changelog

All notable changes to AICommerce WP will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/).

## [4.1.0] - 2026-09-02

### Added
- **Website-centric schema** — the plugin is no longer ecommerce-only. A new
  `SiteTypeDetector` classifies the site (store, blog/publisher, local business,
  organization) and drives the markup: `ArticleSchema` (BlogPosting) for posts,
  `WebPageSchema` (About/Contact/FAQ detection) for pages, and
  Organization/LocalBusiness/OnlineStore on the home page via `ContentSchemaEngine`
  and a type-aware `SiteSchema`. Site type is overridable in settings.
- **LocalBusiness support** — address, opening hours, geo, phone, and price range
  settings feed a `LocalBusiness` node for business sites.
- **Store-level schema** — `Organization`, `WebSite` (with a site SearchAction),
  and `OnlineStore`/`LocalBusiness` JSON-LD on the home and shop pages, with
  automatic de-duplication when Yoast/Rank Math/AIOSEO already provide site markup.
- **Store AI-readiness health check** — a new `SiteHealth` audit and REST endpoint
  (`GET /aicommerce/v1/health`) returning a scored, actionable checklist.
- **Expanded AI crawler roster** — Applebot-Extended, Amazonbot, Bytespider,
  Meta-ExternalAgent/Fetcher, CCBot, DuckAssistBot, OAI-SearchBot, Claude-User,
  Google-CloudVertexBot, and more, across robots.txt rules and crawler monitoring.
- **Richer llms.txt** — now lists top product categories and reflects the store's
  actual crawl policy; new content/contact filters.
- **Admin UI** — a new "Health" tab in the dashboard renders the AI-readiness
  checklist, and Settings gains a "Store / Site Schema" toggle. React admin
  bundle rebuilt.

### Changed
- **Renamed to "AI Discoverability Kit"** — this is the display name. The plugin
  slug, text domain (`tyralix-aicommerce`), main file, option/meta keys, database
  tables, REST namespace, and PHP namespace are unchanged, so there is no data
  migration.
- **WordPress.org readiness pass** — replaced `load_plugin_textdomain`,
  `file_put_contents`, and `file_get_contents` with WordPress APIs
  (`WP_Filesystem`, auto-loaded translations); escaped all exception messages;
  moved the OpenAPI spec into the shipped build; converted safe internal-table
  queries to scoped `phpcs:disable` blocks; converted an inline `<style>` to
  `wp_add_inline_style()`; and set `Tested up to: 7.1`.
- **WooCommerce is now optional** — website/article/page schema, llms.txt, and
  crawler controls run without it; ecommerce features (product schema, feeds,
  agentic commerce) load automatically when WooCommerce is active.
- **Fully free edition** — all Freemius licensing and Pro/Business/Agency tier
  gates removed. Every feature is available to everyone. Availability helpers are
  retained as filters (`aicommerce_is_pro`, etc.) for extensibility.

### Removed
- Bundled Shopify companion app (`shopify-app/`) — this is a WordPress-only plugin.

### Fixed
- `llms.txt` no longer exposes the WordPress admin email; a public contact email
  is opt-in via settings.
- Uninstall now removes every `aicommerce_*` option (including newly added ones)
  and cleans site-transients on multisite.

## [4.0.0] - 2026-03-24

### Platform
- **Add-on Marketplace API** — Third-party developers can extend AICommerce WP
  via the aicommerce/addons/registered filter and aicommerce/addons/init action
- **WP Multisite support** — Network-wide activation with per-site configuration,
  automatic setup for new sites on the network
- **Enterprise tier** — Custom pricing for 10+ sites with dedicated support

### Cross-Platform
- **Shopify App MVP** — AICommerce AI visibility now available for Shopify stores
  (Schema injection + Google + OpenAI feed generation, Modules 1-2 equivalent)

### Internal
- Metrics export API for business intelligence (admin-only, rate-limited)
- Add-ons dashboard tab showing all registered extensions

## [3.5.0] - 2026-03-24

### Added
- **Share-of-Answer tracking** — daily measurement of brand visibility in AI search responses
  across OpenAI, Anthropic, and Gemini platforms
- **Competitor SOA comparison** — benchmark your store against up to 5 competitor domains
- **GEO Dashboard v2** — unified analytics view with KPI strip, 2-column score+issues layout,
  SOA trend chart, competitor table, and attribution section
- **Score history** — 90-day AI Readiness Score trend tracking with chart
- **Weekly digest v2** — now includes SOA trends, competitor comparison, and MCP agent activity

## [3.0.0] - 2026-03-24

### Added
- **Module 6: Agentic Commerce Bridge (Business)** — Complete MCP server with 8 tools
  enabling AI agents to search, browse, and purchase from WooCommerce stores
- **8 MCP Tools** — search_products, get_product_details, check_inventory, get_price,
  get_categories, get_store_info, initiate_checkout, get_checkout_status
- **Stripe Agentic Commerce Protocol** — Agent-initiated checkout sessions with
  WooCommerce native fallback for stores without Stripe
- **Inventory Reservation System** — 10-minute stock hold prevents overselling during
  agent checkout sessions with automatic cleanup cron
- **Fraud Detection** — Multi-signal fraud scoring (IP velocity, cart anomaly, key abuse,
  stock depletion) for agent checkout requests
- **Agent Activity Dashboard** — Real-time transaction log, API key management,
  checkout session tracking (Business tier)
- **/.well-known/mcp.json** — Machine-readable MCP server discovery endpoint
- **Agent Checkout Sessions table** — aicommerce_agent_sessions for session tracking
- **90-day data pruning** — Weekly cron cleans expired sessions and old agent logs

## [2.0.0] - 2026-03-20

### Added
- **Module 4: AI Content Optimizer (Pro)** — Single-product and bulk optimization
  with BYOK support for OpenAI, Anthropic, and Gemini
- **Module 4: AI Image Alt Text** — Vision API integration for automatic product image alt text
- **Module 4: Bulk Catalog Optimizer** — Queue-based overnight processing for unlimited products
- **Module 5: GEO Visibility Dashboard (Business)** — 6-pillar AI Readiness Score with
  trend tracking and auto-calculated score history
- **Module 5: AI Attribution Tracking (Business)** — Revenue and order attribution from
  Perplexity, ChatGPT, Gemini, Copilot, Claude, and other AI platforms
- **Module 5: Priority Issue Queue** — Issues ranked by estimated score impact with auto-fix actions
- **WPML integration** — Per-language schema injection with hreflang and separate language feeds
- **Polylang integration** — Same multilingual support for Polylang users
- **Agency White-label** — Full rebrand with custom logo, colors, plugin name
- **Agency Multi-site Dashboard** — Connect and monitor multiple client sites
- **Weekly digest email** — White-label ready automated reporting

### Changed
- AI Readiness Score upgraded from 4-pillar (v1.x) to 6-pillar system
- ReadinessScore now caches individual pillar calculations independently for better performance
- GEO Dashboard tab redesigned with animated score ring and per-product table

### Pricing
- Business tier launched: $129/mo or $999/yr (Modules 1-5 + GEO Dashboard)
- Agency tier launched: $299/mo (unlimited sites, white-label, client management)

## [1.0.0] - 2026-03-19

### Added
- **Module 1: Schema Engine (Free)** — Auto-generates Product, Offer, AggregateRating,
  FAQ, BreadcrumbList, and Brand entity chain JSON-LD schema on all product pages
- **Schema Conflict Detection** — Automatically suppresses duplicate schema from
  Yoast SEO, RankMath, and AIOSEO
- **Google Rich Results Validator** — Live schema validation with 24h caching
- **AI Readiness Score** — 0-100 score with 4-pillar breakdown
  (Schema, Content, Feeds, Crawlability)
- **Module 2: AI Feed Generator (Pro)** — Google Merchant Center (OAuth auto-submit),
  OpenAI Product Feed Spec, Bing Shopping (IndexNow), Perplexity Shopping
- **ai-commerce.json manifest** — Machine-readable store manifest at /.well-known/
- **Module 3: Crawler Control Centre (Pro)** — Bot detection and logging, robots.txt
  AI rules manager, llms.txt endpoint
- **Builder Integrations** — Elementor widget + Dynamic Tag, Divi module, Bricks element,
  `[aicommerce_score]` shortcode
- **Onboarding Wizard** — Zero-config 5-step setup on first activation
- **REST API v1** — Full /wp-json/aicommerce/v1/ namespace with OpenAPI 3.0 spec
  - 3 public endpoints (status, manifest, openapi)
  - 8 authenticated endpoints (score, batch, schema, validate, settings, feeds, crawler)
  - Transient-based rate limiting (60 req/min with X-RateLimit headers)
  - Standardized error responses via ErrorFormatter
- **Developer Hooks** — 9 filters, 3 actions documented in docs/hooks.md
- **Schema Caching** — Post meta-based schema cache with hash invalidation
- **Feed Health Monitoring** — Per-feed health checks and validation
- **Gutenberg Sidebar Panel** — AI Readiness Score in the block editor
- **Classic Editor Meta Box** — Score display in the classic post editor

### Technical
- PHP 8.1+ required, tested to PHP 8.4
- WordPress 6.4+ required, tested to 6.7
- WooCommerce 8.0+ required, tested to 9.5
- HPOS (High Performance Order Storage) compatible
- WooCommerce Blocks compatible
- Action Scheduler for async feed generation
- PSR-4 autoloading with ServiceContainer DI
- 333 unit tests, 745 assertions
- 6 Playwright E2E tests
- OpenAPI 3.0 specification at docs/openapi.yaml
