=== B2AC for WooCommerce — AI Agent Visibility ===
Contributors: zarklabs
Tags: ai, seo, structured-data, woocommerce, chatgpt
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
WC requires at least: 7.0
Stable tag: 0.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Make your WooCommerce store readable and buyable by AI shopping agents (ChatGPT, Claude, Perplexity, Gemini) — and measure whether they choose you.

== Description ==

AI shopping agents don't render your storefront; they read structured, machine-readable data from your raw HTML. B2AC makes your WooCommerce catalog agent-ready and measurable:

* **Server-side structured data** — injects B2AC-managed Schema.org JSON-LD into your pages (append-only; never edits or deletes your content).
* **Agent root files** — serves `/llms.txt` and `/.well-known/ucp` at your domain root so agents can discover your catalog (with conflict detection — it never shadows a file another plugin or your host already serves).
* **Verified agent-traffic measurement** — see how often AI agents actually visit and cite your store.
* **Agent-driven sale attribution** — reports completed order totals so B2AC can attribute agent-originated sales. Free until it drives a sale.

You keep your own checkout. B2AC never touches payments.

== External services ==

This plugin connects to the B2AC API (https://api.b2ac.ai) **only after you enter your Merchant ID and tick the "Enable B2AC connection" consent box** under WooCommerce → Settings → B2AC. When enabled it:

* fetches your agent-ready structured data and root files from https://api.b2ac.ai;
* on a completed order, sends the order total, currency, order id, and (if present) the B2AC click id to https://api.b2ac.ai/v1/conversions to attribute agent-driven sales. **No customer personal data is sent.**

Data handling and retention are described in the B2AC privacy policy: https://b2ac.ai/privacy

== Privacy ==

The plugin stores two options in your database: your B2AC Merchant ID and your connection-consent flag. It sets a first-party `b2ac_click` cookie (7 days) only when a visitor arrives from a B2AC agent link, so an agent-driven order can be attributed. No personal data is collected by the plugin. Uninstalling removes the plugin's options.

== Installation ==

1. Install and activate the plugin.
2. Go to WooCommerce → Settings → B2AC.
3. Enter your B2AC Merchant ID (from your B2AC dashboard) and tick "Enable B2AC connection".
4. Save. Your structured data, root files, and measurement go live.

== Frequently Asked Questions ==

= Does it modify my theme or content? =
No. It only appends Schema.org JSON-LD via `wp_head` and serves new root paths. It never edits or deletes existing content.

= Does it send customer data? =
No. Order reports contain only totals, currency, order id, and an optional B2AC click id — never customer personal data.

= What if another plugin already provides llms.txt? =
B2AC detects a physical `llms.txt` (or `.well-known/ucp`) and stands down rather than shadowing it.

== Changelog ==

= 0.3.0 =
* WordPress.org readiness: explicit connection consent opt-in, external-service disclosure, root-file conflict detection, clean uninstall, license headers.

= 0.2.0 =
* Serve /llms.txt and /.well-known/ucp at the domain root; capture and echo the B2AC click id for exact attribution.

= 0.1.0 =
* Initial: server-side JSON-LD injection + completed-order conversion reporting.
