=== Shop2LLM ===
Contributors: athenalion
Tags: woocommerce, ai, chatgpt, seo, schema, products, robots.txt, json-ld, gpt, content, llms.txt, ai visibility
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.7
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Make your products and content discoverable by ChatGPT. Works with WooCommerce or standalone WordPress — auto-invites 12 AI search engines, generates schema markup, and builds an AI-friendly catalog for your site.

== Description ==

**Shop2LLM** is the simplest way to make your website content discoverable by AI assistants like ChatGPT. Works with any WordPress site — with WooCommerce for product AI visibility, or standalone for blog/article AI visibility. One-click setup — no complex configuration.

The free version supports **ChatGPT** with 2 AI tools: content search and item detail.

= Third-Party Verified Performance =

**A-rated on [MakeWPFast.com](https://makewpfast.com/plugins/shop2llm/)** — independent speed testing: **+0 MB memory, +0 database queries, +5ms TTFB**. "Negligible impact. Safe to install on any hosting."

= Shop2LLM Visibility Score™ =

Our proprietary 5-dimension, 25-item scoring system measures your content's AI discoverability across Discoverability, Relevance, Content Quality, Entity Authority, and Activity — directly in your post editor.

= Supported AI Platforms (Free) =

* 🧠 **ChatGPT Desktop** — your content appears in ChatGPT's tool palette

= How It Works =

1. **Activate** the plugin (WooCommerce optional)
2. **Copy** the AI connection URL from the settings page
3. **Paste** into ChatGPT
4. **Done** — AI agents can now search your content

= Features =

* **AI Crawler Activity Monitor** — see which AI bots (GPTBot, ClaudeBot, PerplexityBot, and 9 others) are crawling your site, right on your WP dashboard with a 7-day trend chart
* **2 AI tools** — content search and detail lookup
* **AI agent standard** — the protocol used by ChatGPT, Claude, and other AI assistants
* **Content search** — AI agents search by keyword
* **Content details** — full content info including description, images, metadata
* **No usage limits** — unrestricted AI calls
* **Auto-generated API key** — secure Bearer token authentication
* **ChatGPT support** — one-click setup
* **Auto Schema** — JSON-LD Product schema (with WooCommerce) or BlogPosting schema (standalone)
* **AI directory page** — auto-generated llms.txt
* **Crawler-friendly robots.txt** — invite 12 AI bots to index your site
* **WooCommerce enhanced** — product search by category, price, stock, ratings when WC is active

= What AI Agents Can Do (Free) =

* "Search for wireless headphones under $100" (with WooCommerce)
* "Show me the top-rated summer dresses in stock" (with WooCommerce)
* "Find blog posts about sustainability"
* "What's the content of article #42?"

== Installation ==

1. Upload the `shop-to-llm` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to Settings → Shop2LLM
4. Copy your AI connection URL
5. Paste into ChatGPT

= Requirements =

* WordPress 6.0+
* PHP 7.4+
* WooCommerce 8.0+ (optional — for product features)

== Frequently Asked Questions ==

= Does this require WooCommerce? =

No. Shop2LLM works with any WordPress site. WooCommerce is optional — when active, you get product-specific features like price search, stock tracking, and product schema. Without WooCommerce, content search, BlogPosting schema, and all AI crawler features still work.

= Does this require a FinCore cloud account? =

No. Shop2LLM runs entirely on your WordPress server. No external cloud dependency for the core features. Optional analytics and crawler tracking require opt-in consent — see the data privacy section below.

= Is my content data sent to external servers? =

Content data stays on your server. AI agents connect directly to your WordPress REST API.

= What data does the plugin send to external servers? =

External data transmission is **opt-in** and disabled by default. When you enable Analytics in the plugin settings, basic site metadata (site URL, site name, platform type, plugin/WooCommerce/WordPress/PHP version numbers) is sent to our cloud service at api.shop2llm.com for registration purposes. AI crawler visits are also reported — this includes the crawler type, page URL, user agent, and an anonymized site identifier.

No personal customer, order, or content data is transmitted. You can disable analytics at any time in Settings. See our privacy policy at https://shop2llm.com/ for details.

= What's the difference between Free and Pro? =

Free supports ChatGPT with 2 AI tools (content search + detail). Pro adds 6 AI platforms, always-on cloud connection, and analytics dashboard. Upgrade at https://shop2llm.com/

= Is this secure? =

Yes. All AI connections require Bearer token authentication. The API key is auto-generated and can be rotated anytime.

= How do I check if AI crawlers are visiting my site? =

Go to Shop2LLM → Dashboard and look at the "AI Search Activity" card. It shows crawler visits and search terms in real time. You don't need to check server logs.

= Does this affect my site speed? =

No. Shop2LLM is independently tested and **A-rated by MakeWPFast.com** — 0 MB memory overhead, 0 extra database queries, +5ms TTFB on activation. All AI features run on your server through the standard WordPress REST API. External calls (like analytics reporting) are non-blocking with 1s timeouts — they will never slow down your site.

= Can I use this alongside Yoast SEO or RankMath? =

Yes. Shop2LLM auto-detects SEO plugins and skips duplicate schema output to avoid conflicts. It complements SEO plugins by adding AI-specific features (MCP tools, llms.txt, crawler invites) that SEO plugins don't provide.

= How do I upgrade from Free to Pro? =

Click any "Upgrade to Pro" link in the dashboard, or visit https://shop2llm.com/ — Pro unlocks 6 AI platforms, always-on cloud connection, and full analytics.

= What happens if I deactivate the plugin? =

Your site returns to normal. llms.txt, robots.txt AI rules, and schema markup are removed. All settings are preserved if you reactivate later. No data is lost.

= Which AI platforms does the free version support? =

ChatGPT (via MCP connection). Pro adds Claude, Gemini, Copilot, Meta AI, and Amazon Bedrock — with always-on cloud connection so consumers can discover your products without you connecting each AI manually.

== Screenshots ==

1. AI Visibility Dashboard — visibility score, 7-day trends, AI value estimation
2. AI Search Activity & Crawler Visits — see what AI searches for and which platforms visit
3. AI Platforms — supported platforms with Free/Pro badges + upgrade CTA

== Changelog ==

= 1.0.7 =
* Feature: Shop2LLM Visibility Score™ — proprietary 5-dimension 25-item scoring system (L1 Discoverability 30pts, L2 Relevance 25pts, L3 Content Quality 25pts, L4 Entity Authority 15pts, L5 Activity 5pts)
* Feature: Editor meta box with ring gauge score, Problems/Improvements/Good severity grouping, per-item fix guidance, and dimension breakdown
* Feature: Tabbed settings page (Dashboard/Analytics/Settings) matching Pro version UX
* Feature: AI Visibility Summary dashboard card with real-time API calls, crawler bots, and search counts
* Feature: SEO score integration — auto-detects Yoast SEO or Rank Math scores alongside S2LL score in editor
* Feature: AI Crawler Index Report — shows recently indexed pages by AI crawlers with platform and time
* Feature: robots.txt AI fix — one-click repair when robots.txt blocks AI crawlers, with admin notice
* Feature: Weekly crawler summary admin notice — highlights AI activity from the past 7 days
* Feature: AI Crawler Activity Monitor — 7-day sparkline trends, per-bot breakdown, 30-day totals for 12 AI crawlers
* Feature: AI Referral Tracker — 30-day log of visitors from ChatGPT, Perplexity, Copilot and 5 more AI platforms
* Feature: Public AI Discovery Badge — "AI Discoverable" footer badge with /ai-visibility/ verification page
* Feature: Quantified uninstall warning — shows exact data loss count (crawler records, referrals, focus queries)
* Feature: Post list S2LL Score column with color-coded dots and Focus Query display
* Feature: Admin bar crawler badge showing active AI bot count
* Feature: Uninstall confirmation dialog with data loss quantification
* UX: Card-level help tooltips (?) and next-step suggestions (💡) on all settings page cards
* UX: Persistent crawler tracking with 30-day historical data in custom DB table
* UX: Editor Focus Query input unlocks L2 Relevance and L4 Entity Authority dimensions (max 100/100)
* UX: AI Visibility Trend with mini sparkline chart and weekly score snapshots
* Compliance: All external API calls behind opt-in (analytics + entity checks)
* Compliance: Comprehensive privacy disclosure for Wikidata/Wikipedia API usage

= 1.0.6 =
* Performance: Dashboard load time 80x faster (5s → 62ms) — 7 transient reads merged to 1, blocking HTTP removed
* Performance: Community stats load async via JS REST fetch (non-blocking)
* Performance: Crawler detection moved from parse_request → wp hook (frontend only)
* Performance: Crawler report: non-blocking HTTP, 1s timeout, circuit breaker
* Performance: MCP rate limit: 60 req/min, returns 429 for excess
* Performance: llms.txt cached (1h), invalidated on product save
* Performance: Product quality check cached (1h)
* Performance: 20 concurrent admin page < 300ms, 30 concurrent MCP < 230ms
* Compatibility: Lowered PHP requirement from 8.1 to 7.4
* Feature: Works without WooCommerce — supports any WordPress site
* Feature: BlogPosting JSON-LD schema on single posts (when WooCommerce absent)
* Feature: Content search via MCP tools (posts/pages when WooCommerce absent)
* Feature: llms.txt shows posts instead of products (when WooCommerce absent)
* Fix: Removed fatal wp_die() on activation without WooCommerce
* Fix: Graceful degradation for all WooCommerce-dependent features
* Fix: Unified domain to shop2llm.com across all links
* Update: Plugin description now mentions standalone WordPress support

= 1.0.5 =
* Feature: AI Growth Progress card with 5-step milestone tracker + progress bar
* Feature: Peer Comparison card (Your Score vs Avg Free vs Pro Users)
* Feature: Smart Dynamic CTA — 3-tier messaging based on crawler/search activity
* Feature: 4 Achievement Badges (Store Live / AI Discovered / First Search / Power User)
* Feature: Pro-only platform cards with hover preview
* Feature: Community social proof bar (weekly download stats from cloud)
* Feature: Milestone-based review invitation
* Fix: Domain update: aiproductscout.shop → shop2llm.com for all Pro landing links
* Fix: PHP warnings in AI Growth Progress card
* Backend: New /v1/stats public endpoint for community stats
* Backend: Fixed /v1/free/ping route (was missing)
* Fix: PostgreSQL compatibility (AUTO_INCREMENT → SERIAL, ENGINE → removed)
* UI: Unified Pro CTA color to indigo #6366f1 across all cards

= 1.0.4 =
* Privacy: Anonymous activation ping with SHA256-hashed site identifier (replaces plain site_url)
* Feature: Monthly cloud heartbeat ping to distinguish active vs inactive installs
* Privacy: Removed site_name from telemetry; only hashed hostname sent
* Endpoint: Migrated from /v1/free/register to /v1/free/ping

= 1.0.3 =
* Improve: search keywords and short description for better discoverability

= 1.0.2 =
* Add: HPOS (High Performance Order Storage) compatibility declaration
* Add: WooCommerce Marketplace support
* Fix: remove invalid contributor

= 1.0.1 =
* Security: fix permission_callback granting access when API key is empty
* Security: prevent settings save from clearing API key
* Fix: Author URI and readme URLs to use bare domain
* Fix: add wp_unslash before sanitize_text_field on POST inputs
* Fix: proper escaping for dynamic HTML attributes and display values
* Remove: load_plugin_textdomain (WP 4.6+ auto-loads by slug)
* Dev: bump Tested up to 7.0

= 1.0.0 =
* Initial release
* AI agent standard support (MCP JSON-RPC protocol)
* ChatGPT integration with 2 AI tools (search + detail)
* Auto-generated API key with Bearer token auth
* Auto Product Schema (JSON-LD) for AI readability
* AI directory page (llms.txt)
* Crawler-friendly robots.txt (12 AI crawlers)
* Admin dashboard — AI visibility, search activity, crawler logs
* Full i18n support — POT + 14 G20 language PO templates
* Product feed XML for Google Shopping
* wp_enqueue_style compliant admin CSS

== Upgrade Notice ==

= 1.0.0 =
Initial release — Shop2LLM for WooCommerce!

== Privacy ==

This plugin can optionally connect to external services provided by FinCore. All external data transmission is **opt-in** and disabled by default:

* **Analytics (Settings → Shop2LLM → Analytics)** — when enabled, anonymized site metadata (hashed site identifier, platform, version numbers) and AI crawler visits (crawler type, page URL, user agent) are sent to our cloud service. This can be disabled at any time.

* **api.shop2llm.com/fincore/v1/free/ping** — called when analytics is first enabled, to register hashed site metadata.
* **api.shop2llm.com/fincore/v1/crawler/log** — called when AI crawlers visit your store, if analytics is enabled.

No personal customer data, order information, or product data is transmitted. All external calls use HTTPS and are non-blocking (will not affect site performance if the service is unavailable).

Shop2LLM optionally checks Wikidata and Wikipedia public APIs to determine if your brand or focus query appears in their databases. This feature is disabled by default and must be explicitly enabled in settings. When enabled, only your focus query text is sent to these public APIs — no personal data, user data, or site credentials are ever transmitted. API results are cached locally for 7 days to minimize requests.

Privacy Policy: https://shop2llm.com/
Terms of Service: https://shop2llm.com/
