=== Goppa – AI Visibility for WooCommerce ===
Contributors: goppa
Tags: woocommerce, ai-visibility, chatgpt, llms-txt, mcp
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.6.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Measure whether AI assistants mention your store when shoppers ask what to buy — then publish the fixes to your site automatically.

== Description ==

Generating files for AI crawlers is the easy half. The hard half is
knowing whether it worked.

Goppa does both. It serves the files an AI agent needs to read your
catalogue, and it measures what those agents actually answer when a
shopper asks what to buy in your category — so you can tell the
difference between "my store is technically ready" and "my store gets
recommended".

Those two are not the same thing. In our own published research, shops
scoring 100/100 on technical readiness still appeared in 0% of measured
AI answers. The data and method are public at
https://trygoppa.com/study

Think of it as SEO for the answer, not the results page: the work is
the same shape, but the thing you are trying to win is a sentence an
assistant writes, not a blue link.

= Start without installing anything =

You do not need this plugin, or an account, to find out where you stand.
Run the free check on your domain at https://trygoppa.com — it reads your
site from the outside and gives you a readiness score plus the pages an
AI assistant read when answering questions in your category.

Install the plugin when you want the fixes applied for you.

= What the plugin serves =

Four endpoints on your own domain, with no configuration:

* **/.well-known/ucp** — a UCP discovery manifest conforming to the
  published specification, so an agent can find out what your store
  offers.
* **/llms.txt** — a plain-text description of your store, categories and
  products for AI models.
* **/mcp** — a live MCP server (JSON-RPC 2.0, protocol 2025-06-18) with
  three tools: `search_products`, `get_product` and `get_store_info`.
* **/goppa/catalog** — your catalogue as schema.org/Product JSON.

Products, prices, stock status, categories and attributes are read
directly from WooCommerce and cached for ten minutes.

= It applies the fixes, not just the files =

With a Goppa account connected, the plugin checks hourly for fixes found
by the diagnosis and **applies them to your site itself** — the llms.txt,
the robots.txt rules that let named AI crawlers through, the sitemap
reference, and product schema fields that are missing. Then it reports
back what it applied, so the diagnosis you see is the state of your site
and not a to-do list.

Two rules it never breaks:

* **It never changes what you wrote.** Titles, descriptions, prices and
  policies are on a refuse list inside the plugin. Even if the service
  asked, this code would discard the instruction — the list lives here,
  on your server, precisely so it holds regardless of what happens
  upstream.
* **The plugin pulls; the service never pushes.** Every connection is
  outbound from your store, like the telemetry. No authenticated route
  is opened on your WordPress.

It also submits changed product URLs through **IndexNow**, so Bing and
Yandex learn about them in hours rather than weeks. ChatGPT and Copilot
answer from Bing's index — a product outside it cannot be recommended,
however good its data is.

= What this does, and what it does not =

This plugin makes your catalogue **findable, readable and searchable** by
AI agents. Search ignores accents, so "tenis" finds "Tênis" and
"fussball" finds "Fußball".

It does **not** process carts, checkout or payments, and the manifest does
not claim otherwise — it declares catalogue search and lookup, nothing
else. An agent that reads it will send the shopper to your store to buy.
Announcing a checkout that does not exist would make agents try to
transact and fail.

= Optional: see what the agents actually do =

Paste a token from a Goppa account and the plugin reports agent
activity — which endpoint was called, what was searched, which product
was returned. Never visitor data. This is off until you configure it; see
"External services" below.

= External services =

**With no token configured, this plugin makes no external connection.**
Everything above is served from your own site and nothing leaves it.

If you enter a Goppa store token in Settings → Goppa, the plugin sends
agent activity to the Goppa service at `https://trygoppa.com`
(endpoint `/api/ingest`). This is what is sent, and only when an AI agent
requests one of the four endpoints above:

* which endpoint was requested (for example `mcp`);
* the User-Agent string sent by the agent, which the service classifies
  into a known agent name;
* which MCP tool was called (for example `search_products`);
* the search term or product identifier the agent asked for;
* the name of the product returned first.

Records are queued and sent after the response to the agent has already
been delivered, so the service being slow or unreachable never delays
your store. Nothing is sent about your human visitors: no IP addresses,
no customer or order data, no personal information. Clearing the token
stops it immediately.

Service provided by Goppa — [Terms of Service](https://trygoppa.com/terms),
[Privacy Policy](https://trygoppa.com/privacy).

== Installation ==

1. Upload the plugin ZIP via Plugins → Add New → Upload, or unzip into
   `/wp-content/plugins/`.
2. Activate it. The four endpoints are live immediately.
3. Optional: Settings → Goppa for the store description, policy URLs and
   the Goppa token.

Requires WooCommerce. If your permalinks are set to "Plain", switch to any
other setting so the endpoints resolve.

== Frequently Asked Questions ==

= Does it slow my store down? =

No. The catalogue is cached and the routing exits on the first check for
anything that is not one of the four endpoints, so ordinary page loads
never reach this code.

= Does it expose private data? =

No. Only published products, and only the fields already public on your
store: name, description, price, stock status, categories, attributes,
image and link.

= Will AI assistants recommend my store now? =

Serving these protocols is what makes your catalogue readable by an agent
at all — it is a precondition, not a guarantee. Anyone promising a
specific outcome here is guessing.

We publish our own evidence for that. Across 61 shops we measured, 26
that scored a perfect 100/100 on technical readiness still appeared in 0%
of the AI answers we ran. And it varies enormously by category: of 12
beauty shops measured, 1 appeared; of 4 electronics shops, 3 did. A 0%
result means something different depending on what you sell, which is why
the check reports your category alongside your own number.

Method, sample sizes and limitations: https://trygoppa.com/study

= Do I need a Goppa account? =

No. Every endpoint works without one. An account only adds reporting of
what agents did on your store.

= What happens if the Goppa service is down? =

Your endpoints keep working. Pending reports stay queued on your site and
are sent when the service is reachable again.

= Does it work with High-Performance Order Storage (HPOS)? =

Yes. The plugin declares compatibility and does not touch orders at all.

= How do I remove everything? =

Deactivate to stop the plugin and its scheduled task. Delete it to erase
every option it created, including the token.

== Screenshots ==

1. What the plugin has already done on your store, counted from your own catalogue, above the endpoints it serves. No configuration.
2. Every block is a switch. The two that change what your customers see are off until you turn them on.
3. The product summary and the FAQ, as visible text on the page. Both are built only from fields you already filled in, and both are off until you turn them on.
4. llms.txt, served on your own domain, written from your catalogue.


== Changelog ==

= 0.6.2 =
* Renamed from "Goppa Agentic Commerce" to "Goppa - AI Visibility for
  WooCommerce", so the name says what the plugin is for. Nothing else
  changes: same plugin, same settings, same address. Your site keeps
  updating normally.
* The settings page now shows what Goppa has actually done on your
  store — how many products are being served as structured data, how
  many URLs went to Bing and Yandex — instead of only listing what it
  could do. Until now that summary appeared only for connected
  accounts, so anyone using the plugin on its own saw a form and no
  evidence that anything had happened.
* Asks for a review, once, after a week of real use, inside this
  plugin's own settings page. Dismissable, and the dismissal sticks.

= 0.6.1 =
* The settings page now says what this plugin can and cannot tell you.
  It makes your catalogue readable; whether an assistant actually names
  your store has to be measured by asking, from the outside. The note
  disappears once you connect an account.
* The connection field used to ask for a token without saying where one
  comes from. It now links to the page that issues it, with this site's
  address already filled in.

= 0.6.0 =
* **New: a short summary on product pages.** Two factual lines and a
  spec list, built only from fields you already filled in — name,
  category, brand, price, stock and attributes. Your own description is
  never read, changed or rewritten. Off by default.
* **New: your category guide, as a draft.** The comparison guide written
  on the platform can now land here as a draft post instead of being
  copied and pasted. It is created once, it is always a draft, and once
  you touch it the text is yours — we never write over it. Off by
  default.
* **New: your official profiles in the schema (`sameAs`).** The store
  identity block already told an assistant your name and address. It now
  also links the profiles you confirm on the platform, which is what
  tells a model that this shop, that review page and that social profile
  are the same business. Nothing is published until you confirm each one.
* **New: the FAQ can also be text on the page.** Google no longer uses
  FAQ Page markup and AI reads the page itself, so the same questions and
  answers can now appear as visible text. Off by default: hidden markup
  does not change what your customers see, and this does.
* **New: FAQ on category pages.** Built from the products in that
  category — how many there are, what they cost, which brands you carry.
  Counted from your own catalogue, never written for you. Also off by
  default.
* **New: see when an AI actually used your shop.** Until now the plugin
  only reported the agent files it serves, so an assistant reading a
  normal product page went unseen. It now reports two things that are
  real counts, not estimates: pages fetched by AI crawlers, and visits
  from people who clicked a link inside an AI answer.
* The dashboard separates the two that matter. `ChatGPT-User`,
  `Claude-User` and `Perplexity-User` fetch a page **because someone
  asked a question right then** — those are counted as real use.
  `GPTBot` and the other sweeping crawlers are shown separately, because
  a crawler passing through says nothing about being recommended.
* **Privacy:** only the referring host is recorded (for example
  `chatgpt.com`), never the full address, which can contain the
  visitor's conversation id. No IPs, no raw headers, and ordinary
  visitors are still not recorded at all.

= 0.5.1 =
* **Fixed a privacy bug: hidden products were being served to AI agents.**
  If you had set a product's catalogue visibility to *Hidden*, or
  protected it with a password, it was still included in the catalogue
  the plugin publishes for AI assistants. Nothing changed on your
  storefront, so there was no way to notice. Those products are now
  excluded. If you use hidden products for B2B pricing, discontinued
  items or testing, update.

= 0.5.0 =
* New: the plugin now **applies the fixes by itself**. Once an hour it
  asks Goppa whether your latest diagnosis found anything it can repair,
  and repairs it: serving llms.txt, allowing AI crawlers and declaring
  the sitemap in robots.txt, and filling in structured-data fields your
  products were missing. Before this you had to copy and paste them.
* **It will never touch what you wrote.** Titles, descriptions, prices
  and policies are refused by the plugin itself, not only by the server
  — so even a bug or a breach on our side cannot change how your store
  looks to a shopper. Only data that AI agents read is ever modified.
* Settings now show exactly what was applied and when, and the plugin
  does nothing at all until your store is connected.

= 0.4.0 =
* New: **IndexNow**. Your product URLs are submitted to Bing and Yandex
  whenever a product is added, updated or removed. This matters more than
  it sounds: ChatGPT and Copilot answer shopping questions from Bing's
  index, so a product that is not in that index cannot be recommended,
  however good its structured data is. IndexNow cuts the wait from weeks
  to hours. The verification key is generated and served automatically —
  nothing to configure. Turn it off under Settings if another plugin
  already submits your URLs.
* Fixed: uninstalling did not remove the `goppa_schema` option, so a
  setting from 0.3.0 survived the plugin being deleted.


= 0.2.1 =
* Fixed: on stores running the stable WooCommerce release, every endpoint
  served an **empty catalogue**. The plugin routed on `init` at priority
  0, the same priority WooCommerce uses, and loaded first — so
  `wc_get_products()` ran before WooCommerce had registered the `product`
  post type. Routing now runs at priority 20.
* Fixed: an empty catalogue was cached for ten minutes. If the first
  request happened before products existed, products added afterwards
  stayed invisible to agents. Only a non-empty catalogue is cached now.
* Fixed: search ignored accents. "tenis de corrida" ranked a t-shirt
  above a running shoe, because "tenis" did not match "Tênis". Accents
  are folded on both sides now, covering the Latin alphabet (including
  ß, ø, æ, ł, ğ).
* Fixed: a match in the product name now outranks a match in the
  description.
* Fixed: `get_product` also matches without accents, so a lookup cannot
  fail where the search succeeded.
* Fixed: deactivating left the hourly reporting task scheduled forever.
* Fixed: uninstalling did not remove the store token or the telemetry
  options, leaving a secret in the site database.
* Changed: text domain is now `goppa-agentic-commerce`, matching the plugin
  slug, so translations resolve.

= 0.2.0 =
* Rewrote the UCP manifest to conform to the published specification,
  checked against a live Shopify manifest. The previous version used
  fields that do not exist in the spec.
* The manifest now declares only what the plugin does — catalogue search
  and lookup. No checkout, cart or payment handlers.
* Corrected llms.txt and the plugin description, which claimed the store
  was transactable by agents. It is not; purchase happens on the store.
* Hardened the MCP server against malformed input. Batches, `null`, bare
  numbers, parameters sent as strings and arguments of the wrong type
  used to raise errors — which would surface as HTTP 500 on the
  merchant's site. All of them now return proper JSON-RPC errors, and
  batch size is capped.
* Added optional reporting of agent activity.

= 0.1.0 =
* First release: UCP manifest, llms.txt, MCP server, schema.org catalogue
  endpoint, settings page, catalogue cache.

== Upgrade Notice ==

= 0.2.1 =
Important. On the stable WooCommerce release every endpoint served an
empty catalogue because of a hook ordering bug. Also fixes search on
accented product names and removes the store token on uninstall. Upgrade.

= 0.2.0 =
The UCP manifest was not conformant and the plugin claimed your store was
transactable by agents. Both corrected. Upgrade recommended.
