=== Zoventic GEO – Generative Engine Optimization (GEO) & AI Search for WooCommerce ===
Contributors: zoventic
Tags: woocommerce, ai, geo, product feed, llms.txt
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 7.0
WC tested up to: 11.2
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Empower WooCommerce for AI search. Validated JSON-LD schemas, automated /llms.txt feeds, and crawler telemetry for ChatGPT & Gemini.

== Description ==

**Zoventic GEO** is a Generative Engine Optimization (GEO) and AI discoverability suite built for WooCommerce.

While traditional SEO plugins optimize for standard 10-blue-link search result pages, **Zoventic GEO structures your store for AI Answer Engines, RAG (Retrieval-Augmented Generation) ingestion, and conversational shopping queries** across ChatGPT Search, Perplexity AI, Google AI Overviews, Claude, and Copilot.

### Why Does Your WooCommerce Store Need GEO?
Standard WooCommerce product pages carry 1.5MB to 4MB of heavy HTML, sliders, and JavaScript. When AI search crawlers (like `GPTBot` or `PerplexityBot`) crawl your site, their strict token budgets get exhausted before reading your actual pricing, product specs, and warranty policies.

Zoventic GEO solves this by providing:
1. **Dynamic `/llms.txt` and `/llms-full.txt` Streaming:** Standard-compliant, clean markdown product feeds that AI agents can ingest in fractions of a second with zero token bloat.
2. **Enhanced JSON-LD Entity Graphs:** Injects rich, structured semantic schema (Product, Offer, verified AggregateRating, Return Policy, and Availability) that conversational LLMs require to quote your products accurately.
3. **AI Prompt Injection Shield (Prompt Guard):** Protects your store catalog against indirect prompt injection, hidden zero-width unicode attacks, and malicious competitor redirection payloads.
4. **AI Crawler Access Telemetry:** Real-time logging of verified AI bots (`GPTBot`, `PerplexityBot`, `ClaudeBot`, `Bytespider`) with cached Reverse DNS (FCrDNS) anti-spoofing.
5. **Native WooCommerce 8.5+ AI Order Attribution:** Automatically queries WooCommerce's built-in order attribution (`_wc_order_attribution_*`) to track orders and GMV generated directly from AI search citations.
6. **HTTP ETag & 304 Caching:** Saves up to 95% server bandwidth by sending instant HTTP 304 Not Modified responses when catalog data has not changed.

== External Services ==

This plugin connects to external third-party services as detailed below:

1. **Microsoft IndexNow API**
* **Service:** Microsoft IndexNow API
* **Endpoint:** `https://api.indexnow.org/indexnow`
* **Purpose:** When enabled in settings, automatically pings search engines (Microsoft Bing, Yandex, Naver, and participating AI search engines) upon product publication or update to accelerate discovery without manual sitemap submissions.
* **Data Transmitted:** Newly published or modified WooCommerce product URLs and the store's unique IndexNow authentication key. No customer data, order details, or personal information is ever transmitted.
* **Trigger:** Dispatched non-blocking via `wp_remote_post()` only when the "Enable IndexNow" setting is active and a product status changes to published.
* **Service Terms:** [Microsoft IndexNow FAQ & Terms](https://www.indexnow.org/faq)
* **Privacy Policy:** [Microsoft Privacy Statement](https://privacy.microsoft.com/en-us/privacystatement)

2. **Client-Configured AI Service Providers (BYOK - Bring Your Own Key)**
The plugin allows site administrators to optionally connect their own third-party AI provider API credentials under Settings > AI Engine (BYOK). When configured, the plugin connects directly to the respective provider to validate credentials and conduct merchant-initiated actions:

* **OpenAI API**
  * **Endpoint:** `https://api.openai.com/v1/models` and `https://api.openai.com/v1/chat/completions`
  * **Purpose:** Authenticating merchant-supplied API keys and tracking grounded search citations when an OpenAI key is configured.
  * **Data Transmitted:** Admin-entered API key (in authorization header) and product/search query text. No customer, order, or PII data is transmitted.
  * **Trigger:** Admin-initiated "Test Key" button click in Settings or scheduled Rank Radar audits.
  * **Terms:** [OpenAI Terms of Use](https://openai.com/policies/terms-of-use)
  * **Privacy:** [OpenAI Privacy Policy](https://openai.com/policies/privacy-policy)

* **Google Gemini API**
  * **Endpoint:** `https://generativelanguage.googleapis.com/v1beta/models/`
  * **Purpose:** Authenticating merchant-supplied API keys and Google Search grounded citation audits.
  * **Data Transmitted:** Admin-entered API key and product/search query text. No customer, order, or PII data is transmitted.
  * **Trigger:** Admin-initiated "Test Key" button click in Settings or scheduled Rank Radar audits.
  * **Terms:** [Google Terms of Service](https://policies.google.com/terms)
  * **Privacy:** [Google Privacy Policy](https://policies.google.com/privacy)

* **Perplexity AI API**
  * **Endpoint:** `https://api.perplexity.ai/chat/completions`
  * **Purpose:** Authenticating merchant-supplied API keys and live web-grounded Sonar citation audits.
  * **Data Transmitted:** Admin-entered API key and product/search query text. No customer, order, or PII data is transmitted.
  * **Trigger:** Admin-initiated "Test Key" button click in Settings or scheduled Rank Radar audits.
  * **Terms:** [Perplexity Terms of Service](https://www.perplexity.ai/tos)
  * **Privacy:** [Perplexity Privacy Policy](https://www.perplexity.ai/privacy)

* **Anthropic Claude API**
  * **Endpoint:** `https://api.anthropic.com/v1/messages`
  * **Purpose:** Authenticating merchant-supplied API keys.
  * **Data Transmitted:** Admin-entered API key and lightweight ping message. No customer, order, or PII data is transmitted.
  * **Trigger:** Admin-initiated "Test Key" button click in Settings.
  * **Terms:** [Anthropic Terms of Service](https://www.anthropic.com/terms)
  * **Privacy:** [Anthropic Privacy Policy](https://www.anthropic.com/privacy)

== Installation ==

1. Upload the `zoventic-geo` folder to your `/wp-content/plugins/` directory, or install directly through the WordPress Plugins dashboard.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Ensure **WooCommerce 7.0+** is installed and active.
4. Navigate to **Zoventic GEO** in your WordPress admin menu.
5. Review your automatically generated `/llms.txt` feed and verify your catalog's GEO Readiness Score.

== Frequently Asked Questions ==

= Does this plugin guarantee #1 ranking in ChatGPT? =
No. LLMs are probabilistic, non-deterministic answer engines. Anyone claiming "guaranteed #1 AI ranking" is selling deceptive hype. Zoventic GEO maximizes your citability and readability so AI engines choose your store when answering relevant buyer queries.

= Where can I view my store's llms.txt file? =
Once activated, your feed is accessible at `https://yourstore.com/llms.txt` and `https://yourstore.com/llms-full.txt`.

= Will this slow down my store's checkout? =
Not at all. Zoventic GEO operates with zero frontend JavaScript or CSS on customer-facing pages. Crawler logging is deferred to the WordPress `shutdown` hook via an asynchronous memory buffer, having 0.00ms impact on checkout latency.

= Is this compatible with Rank Math and Yoast SEO? =
Yes. Zoventic GEO hooks cleanly into `woocommerce_structured_data_product` and existing SEO schema filters, preventing duplicate schema declarations and ensuring seamless harmony.

== Screenshots ==

1. Overview Dashboard – Live AI crawler traffic trends, catalog health score, estimated AI sales, and daily automated rank radar.
2. AI Answer Engine Sales Attribution – Native WooCommerce order attribution breakdown across ChatGPT, Perplexity, Claude, Copilot, and Gemini with recent order log.
3. Rank Radar [Pro Edition] – Automated high-intent buyer query monitoring, multi-LLM citation forecasting, and 5-audit ranking trajectory.
4. WooCommerce Products GEO Health – Product-level AI readiness audit, catalog filtering, and 16-point schema inspection.
5. Product Schema Inspector & 1-Click Enrich Drawer – Deep 16-point product health audit, readiness scoring, and 1-Click AI enrichment side drawer.
6. AI Crawler Access Log Monitor – Real-time detection and logging of GPTBot, PerplexityBot, ClaudeBot, Google-Extended, and Applebot with latency and status codes.
7. AI Search Query Benchmark & Simulator [Pro Edition] – Test and preview how AI answer engines discover, cite, and recommend store products compared to standard listings.
8. llms.txt Feed Studio – Live streaming Markdown product catalog feed with configurable rules for variations, reviews, stock status, and AI coupon codes.
9. Engine Settings & Preferences – Store knowledge & brand profile configuration, live robots.txt crawler permissions matrix, and BYOK AI models.

== Changelog ==

= 1.0.1 =
* Enhanced AI verification safety & full third-party service transparency disclosures.
* Upgraded Rank Radar citation audit engine to prevent simulated fallbacks when live credentials fail.
* Added full database cleanup routines on plugin uninstallation.
* Added redirection limits and safe remote requests for store and competitor audits.
* Verified compatibility with WordPress 7.1 and WooCommerce 11.2.

= 1.0.0 =
* Initial official release.
* Dynamic `/llms.txt` and `/llms-full.txt` stream with ETag 304 caching.
* JSON-LD semantic entity graph enhancer.
* Real-time AI crawler access logging with cached FCrDNS anti-spoofing.
* AI Prompt Injection Shield (Prompt Guard).
* Native WooCommerce 8.5+ AI Order Attribution & Revenue tracking.
* React 19 + Ant Design v6 isolated admin dashboard.

== Upgrade Notice ==

= 1.0.1 =
Maintenance & engine reliability release. Fully tested with WordPress 7.1 and WooCommerce 11.2.

= 1.0.0 =
Initial official release. Ensure WooCommerce 7.0+ is installed and active.
