Design note — WooCommerce connector (woocommerce)

Target registry item: C7 (catalog row only — available: false, wave 4, demand-driven; playbook §4.3 "Non-Shopify commerce / POS", OB-GAP-3). Status: design note only — NOT built. The catalog row enumerates the three fields below so the surface can say "not yet available"; posting any payload is refused 409 provider_not_available. Built only when a tenant declares demand (docs/OPEN_ITEMS.md row). CDoD points 1–14 tracked in docs/reports/ONBOARDING_CONNECTORS_STATE.md.

Auth

Read-only, merchant-owned (D2/D11). The WooCommerce REST API authenticates with a consumer key + consumer secret pair the store owner generates under WooCommerce → Settings → Advanced → REST API (vendor docs, fetched 2026-10-12). The key is tied to a WordPress user and carries that user's permissions; it is created with Read permission for this connector. Over HTTPS the pair is sent as HTTP Basic auth; the base path is <store_url>/wp-json/wc/v3. Plain-HTTP stores are refused (the API would require one-legged OAuth 1.0a there, and credentials over HTTP are not an admissible posture).

Vault-only per (tenant, provider); no environment fallback; vault error 503; absence merchant_credentials_not_configured.

Fields (catalog row)

key label secret required pattern help
store_url Store URL no yes ^https://[^\s/]+(/[^\s]*)?$ The store's public https address as shown in WordPress → Settings → General → Site Address (WooCommerce must answer at /wp-json/wc/v3 under it). https only.
consumer_key REST API consumer key yes yes — WooCommerce → Settings → Advanced → REST API → Add key, permission Read. Shown once at creation. Never echoed.
consumer_secret REST API consumer secret yes yes — Same screen, shown once with the key. Never echoed.

Scopes

Key permission Read (never Write / Read-Write). Test connection asserts the key cannot write by reading the key's own permission where the API exposes it; the adapter is write-free by construction.

Data topics

Orders (totals, line items, SKUs, refunds, dates — the order-economics inputs Net Yield keys on), products / variations (SKU list), refunds, and — person-level — the customer and billing/shipping blocks on orders (name, email, phone, address). Aggregates and SKU economics first.

Per data topic: orders/products/refunds without the customer and address blocks are the de-personalised remainder and flow on the aggregate path; the customer, billing and shipping fields are person-level and flow only under a consent-registry grant with a per-subject basis — evaluate_consent runs fail-closed on every event and without a basis the mapper drops those fields before persistence. The tenant's P2-5 consent declaration never substitutes for a per-subject basis. Posture test pins both directions.

Mapper target

Commerce adapter → MAPPERS["woocommerce"] → ingest_gate → mizoki_unified_data, beside the Shopify commerce ingest; feeds Net Yield order economics and the SKU list that costs are keyed on (P3-1). No new store; no writeback. A "WooCommerce merchant" classification does not exist — the only merchant readout is the Shopify one (owner ruling 2026-10-06); adding one is an owner ruling, not a mapper side effect.

Failure modes → test-connection verdicts

Failure Verdict / fix
store_url not https or not a URL 422 invalid_field_format.
404 at /wp-json/wc/v3 rest_api_not_found → "WooCommerce is not active, or pretty permalinks are off, under this address."
401 woocommerce_rest_cannot_view permission_denied → the key's user lacks the role, or the key was deleted / user removed.
401 on auth token_invalid → regenerate the key pair.
TLS verification fails tls_error → fix the store certificate; the adapter never skips verification.
Vault read error 503 fail-closed.

Flag

WOOCOMMERCE_SYNC default OFF; available: false until CDoD point 14 (live verification against a customer-owned store, recorded with date and revision).

Owner / operator gates

Vendor references

← All docsView source on GitHub →