Product JSON-LD · WooCommerce
Add product JSON-LD to WooCommerce (for developers and for your AI agent)
The exact, verified way to put AI-search JSON-LD on a WooCommerce product page — server-side, and multilingual. Do it yourself with the steps below, hand the runbook to your AI agent, or let Store Operators do it for you.
JSON-LD must render SERVER-SIDE. The WordPress/WooCommerce REST API cannot edit theme PHP, so use ONE of: (a) a code-snippets plugin (Code Snippets or WPCode) with a PHP snippet; (b) your child theme's functions.php via SFTP/SSH; or (c) the lightweight Store Operators helper plugin if you want it auto-maintained across the whole catalogue.
Add a PHP snippet that hooks `wp_head` (or `woocommerce_before_single_product`) and echoes the JSON-LD `<script type="application/ld+json">` ONLY on this product: guard with `if (is_product() && get_the_ID() === <product-id>)`. Find <product-id> in the WooCommerce admin (Products → the product → the `post` ID in the URL).
Multilingual (WPML / Polylang): branch on the current language (`get_locale()` / `ICL_LANGUAGE_CODE` / `pll_current_language()`) and echo THAT language's JSON-LD, so each language version of the product serves its own (single-language store — no branch needed).
Avoid the product-description field for the `<script>`: WordPress may strip it via `wp_kses` depending on the editing user's capability (`unfiltered_html`), so it's unreliable. Emit it via `wp_head` instead.
- Verify
- View source on the product URL (each language): `application/ld+json` present and valid.
- Multilingual
- Multilingual = branch by current language in the snippet (WPML/Polylang) OR let the Store Operators plugin serve per-locale automatically. Each language version of the product must emit its own language's JSON-LD.

Hand this to your own agent
This runbook adds product JSON-LD to one product at a time. It backs up first, works on an unpublished copy, verifies the result and publishes nothing without you.
You are helping me add AI-search JSON-LD to ONE product on my WooCommerce (WordPress) store, safely.
SAFETY (follow exactly, in order):
1. Back up first: duplicate the current theme (or export it) BEFORE any write. No exceptions.
2. Work on an UNPUBLISHED copy / preview — never edit the live theme directly.
3. Use a least-privilege token: only the scopes the task needs.
4. After each change, VERIFY (fetch the page, confirm the JSON-LD renders and is valid).
5. Do NOT publish. Show the human the preview and the verification, and let the human approve the publish.
6. Keep the rollback ready: if anything looks wrong, restore the backed-up theme.
ACCESS:
- I will give you either WP-CLI/SSH access, or admin + a code-snippets plugin (Code Snippets/WPCode). Code injection needs one of these — the WooCommerce REST key alone CANNOT add theme code.
TASK:
- Product URL: https://your-store.com/product/your-product. Store locales: your primary language.
1. Back up first: export the active/child theme (or the current snippets).
2. Add a PHP snippet (via the snippets plugin, or a child-theme mu-plugin via WP-CLI/SSH) that hooks `wp_head` and echoes the JSON-LD `<script type="application/ld+json">` ONLY on this product (`is_product() && get_the_ID() === <product-id>`). Avoid the product-description field (WordPress may strip scripts via wp_kses depending on user capability).
3. If the store uses WPML/Polylang, branch on the current language and echo that language's JSON-LD (ask me for each language's JSON-LD — Outcite generates one per language).
4. VERIFY: fetch the product URL (each language) and confirm `application/ld+json` is present and valid.
5. STOP and show me the result. I activate/publish the snippet myself.
JSON-LD to inject:
{}The runbook is in English on purpose — agent prompts work most reliably in English. You can still talk to the agent in your own language.
Already have your JSON-LD?
Outcite outputs a finished, per-language JSON-LD. Then the agent doesn't invent fields, it only installs the blocks correctly. Tell it how many language versions you have and the prompt adapts.
I already have a finished product JSON-LD from Outcite. Do NOT generate a new one and do NOT change its contents. Platform: WooCommerce. Locales: I have one JSON-LD block. Do this: 1. Install it so it renders server-side on the product page. 2. Do not alter any field values. 3. Verify the rendered page and show me the JSON-LD it outputs. SAFETY: back up before any write, work on an unpublished copy, publish nothing without my approval, and tell me the rollback. Paste the Outcite blocks below this line: ---
Don't have your JSON-LD yet? Generate it with Outcite — it outputs a per-language block for every language version.
See where your store is invisible to AI.
Rather not do it yourself?Generate the JSON-LD now (Outcite)A ready, citable page + schema, per run.
Rather not do it yourself?Done for you: AI Visibility FixWe build and maintain the whole data layer.
Rather not do it yourself?Agentic commerceThe customer's own AI buys directly from your store.
Rather not do it yourself?Learn the whole system (book + course)Use the runbook on this page — paste it into Claude. It connects to your WooCommerce store with your own credentials and adds the schema.org JSON-LD, with backup, preview, verification and your approval before publishing.
The same runbook works for ChatGPT (or any capable AI agent): it authenticates to your store and injects the JSON-LD server-side, safely, and stops for your approval before publishing.
Yes — server-side (client-side-only JavaScript is not reliably seen by AI crawlers). Do it with the agent runbook here, hand it to a developer, or have Store Operators do it for you.