WooCommerce Integration Guide
This guide explains integrating with WooCommerce REST API (WP REST + WooCommerce endpoints).
Credentials
WOOCOMMERCE_CONSUMER_KEYWOOCOMMERCE_CONSUMER_SECRETWOOCOMMERCE_STORE_URL(e.g.,https://shop.example.com)
Example: fetch products
const res = await fetch(`${WOOCOMMERCE_STORE_URL}/wp-json/wc/v3/products?consumer_key=${KEY}&consumer_secret=${SECRET}`);
const products = await res.json();
Webhooks and verification
- WooCommerce webhooks may be signed depending on the plugin; verify the request origin and payload.
- Always respond with 200 quickly and process in background.
Mapping variants and attributes
- WooCommerce products include
variationswhich must be normalized to your internal Product/Variant model.
Rate limits & caching
- Some self-hosted stores may be slow: use caching and retries. Avoid blocking chat responses on live store lookups; prefer cached results and background refresh.