# llms.txt + AEO Schema for WooCommerce — Complete guide

> Overview The DataFirefly llms.txt + AEO Schema plugin makes your WooCommerce store visible and correctly understood by AI agents (ChatGPT, Claude, Perplexity, Gemini). It combines two complementary mechanisms: A dynamic…

- Page: <https://www.datafirefly.com/en/documentation/llms-txt-aeo-schema-woocommerce/>
- Language: en
- Last updated: 2026-08-06
- Other languages: [fr](https://www.datafirefly.com/documentation/llms-txt-aeo-schema-woocommerce/index.md), [es](https://www.datafirefly.com/es/documentation/llms-txt-aeo-schema-woocommerce/index.md), [de](https://www.datafirefly.com/de/documentation/llms-txt-aeo-schema-woocommerce/index.md), [it](https://www.datafirefly.com/it/documentation/llms-txt-aeo-schema-woocommerce/index.md), [pl](https://www.datafirefly.com/pl/documentation/llms-txt-aeo-schema-woocommerce/index.md), [nl](https://www.datafirefly.com/nl/documentation/llms-txt-aeo-schema-woocommerce/index.md), [pt](https://www.datafirefly.com/pt/documentation/llms-txt-aeo-schema-woocommerce/index.md)
- Index: <https://www.datafirefly.com/en/documentation/llms.txt>

## Overview

The **DataFirefly llms.txt + AEO Schema** plugin makes your WooCommerce store visible and correctly understood by AI agents (ChatGPT, Claude, Perplexity, Gemini). It combines two complementary mechanisms:

- A **dynamic /llms.txt endpoint** compliant with the llmstxt.org standard, generated from your catalog with per-language caching.
- **Product schema enrichment** adding the anti-hallucination attributes agents look for: brand, GTIN, materials, compatibility, return and shipping policies, plus a separate agent-targeted FAQPage schema.

## Requirements

- WordPress 6.2 or higher
- WooCommerce 8.0 or higher (tested up to 9.4)
- PHP 8.0 or higher
- Optional: Polylang or WPML for multilingual generation

## Installation

1. Download the `dfllmstxtaeo.zip` archive from your DataFirefly account.
2. In the WordPress admin, go to **Plugins → Add New → Upload Plugin**, select the ZIP and click **Install Now**.
3. Activate the plugin. The rewrite rule for `/llms.txt` is registered and permalinks are flushed automatically on activation.
4. Check that `https://yoursite.tld/llms.txt` responds. If you get a 404, go to **Settings → Permalinks** and click **Save Changes** to force a rules flush.

## General settings

The settings page lives under **WooCommerce → llms.txt + AEO**. It shows your llms.txt URL at the top with a direct preview link.

### Serving /llms.txt

Four toggles control the main features: the llms.txt endpoint, product schema enrichment, FAQPage schema output and the Speakable specification. Everything is enabled by default.

### llms.txt content

- **Include products / pages / posts**: choose which sections are generated.
- **Max products**: from 1 to 1000 (default 200). Most recent products are listed first.
- **Cache duration**: in minutes, 0 to disable. The cache is cleared automatically anyway on every product, page or settings edit.
- **Intro paragraph**: free text (plaintext or markdown) inserted after the site description.

### Schema defaults

- **Default brand name**: used when a product has no brand of its own.
- **Merchant country (ISO-2)**: leave empty to use the WooCommerce base country.
- **Default return window**: in days, feeds hasMerchantReturnPolicy.
- **Return fees**: free return, customer pays shipping, or customer pays all fees.

## The /llms.txt endpoint

The file is served with `Content-Type: text/markdown; charset=utf-8` and `X-Robots-Tag: noindex` headers (it targets AI crawlers, not the Google index). Generated sections: product categories, products (title, URL, price, short description), pages, posts, then links to the privacy policy and terms pages configured in WordPress and WooCommerce.

### How caching works

Content is cached in a language-scoped transient (`dfllmstxtaeo_llms_cache_{lang}`). It is invalidated automatically on `save_post_product`, `save_post_page`, `deleted_post` and whenever the plugin settings are saved.

### Multilingual

Polylang and WPML are detected automatically. Each language gets its own llms.txt served under its URL prefix (e.g. `/en/llms.txt` depending on your Polylang setup), with an independent cache. Without a multilingual plugin, the WordPress locale is used.

## The AEO Schema tab on products

Every product gains an **AEO Schema** tab in the WooCommerce data panel (Product → Edit).

### Available fields

- **Brand**: overrides the global brand for this product. As a fallback, the plugin looks for a `pa_brand` or `brand` attribute.
- **GTIN / EAN / UPC**: 8, 12, 13 or 14 digits. The matching `gtin8/12/13/14` property is added automatically based on length.
- **MPN**: manufacturer part number.
- **Materials**: comma-separated (e.g. "leather, recycled cotton"). A single material produces a string, several produce an array.
- **Compatible with**: one item per line. Each line becomes an `isRelatedTo` Product entry.

### Agent-targeted FAQ

Below the fields, the **Agent-targeted FAQ** section lets you add short, factual question/answer pairs (exact compatibility, dimensions, ingredients, certifications). They feed a separate `FAQPage` JSON-LD schema, output only on product pages that have at least one entry. This FAQ is invisible on the front end: it does not render in the theme, it exists purely for agents.

Write answers as verifiable facts, not sales copy. An agent reading "compatible with models X, Y and Z" will cite exactly those models; an agent reading "compatible with most devices" will invent the list.

## Added Schema.org fields

On the **Product** object: brand, gtin (+ gtin8/12/13/14), mpn, material, color, size, weight, height, width, depth (QuantitativeValue with WooCommerce units), isRelatedTo, speakable. On each **Offer**: seller (Organization with the site name and URL), hasMerchantReturnPolicy (country, window in days, fee type), shippingDetails (destination, deliveryTime with 0-1 day handlingTime and 1-5 day transitTime).

The color and size fields are picked up automatically from the `pa_color` / `color` and `pa_size` / `size` attributes when present. Weight and dimensions come from the product's native shipping fields.

## SEO plugin compatibility

The plugin acts exclusively through the native `woocommerce_structured_data_product` filter, which only touches the JSON-LD generated by WooCommerce itself. Yoast SEO, RankMath and SEO Press output their blocks independently through `wp_head`: no collision. Values already present in the WooCommerce schema are preserved.

## Developer hooks

- `dfllmstxtaeo_llms_output`: filters the final llms.txt content. Arguments: the content (string) and the language code.
- `dfllmstxtaeo_product_schema`: filters the enriched schema array before output. Arguments: the markup array and the WC_Product object.

```
add_filter( 'dfllmstxtaeo_product_schema', function ( $markup, $product ) {
    $markup['award'] = 'Design award 2026';
    return $markup;
}, 10, 2 );
```

## Troubleshooting

- **/llms.txt returns a 404**: re-save permalinks (Settings → Permalinks → Save Changes).
- **The file does not reflect a recent change**: the cache clears on edit, but you can force it by temporarily setting cache duration to 0, or by re-saving the settings.
- **FAQPage does not appear**: check that the product has at least one complete question/answer pair and that the "Output FAQPage schema" option is enabled.
- **Validating the schema**: test a product URL with the schema.org validator or Google's Rich Results tool to inspect the full JSON-LD.
