Skip to content
v0 “Istanbul” · THIS IS WORK IN PROGRESS.

WooCommerce Native Storefront

For AI coding agents: start with /start.md (build playbook) and /rules.md (compiler rules), see /llms.txt for the complete documentation index, or read this page as Markdown at /md/docs/integrations/woocommerce.md.

Configure WooCommerce stores, products, shipping zones, orders, and optimistic cart hooks in TypeScript.

Scaffolding a storefront

Add a complete WooCommerce storefront to any project with:

npx typedpress add shop

Declarative store & catalog builders

Export store(), product(), productCategory(), productTag(), and order() from tp/shop.ts (re-exported in typedpress.config.ts):

import { store, product, productCategory, productTag, order } from "typedpress";

export const shop = store({
  currency: "EUR",
  country: "PL",
  sellTo: ["PL", "DE"],
  shipping: [
    {
      name: "Poland",
      countries: ["PL"],
      methods: [
        { type: "flatRate", title: "Courier", cost: "15.00" },
        { type: "freeShipping", title: "Free over 200", minimum: "200.00" },
      ],
    },
  ],
  payments: ["cod"],
});

export const products = product({ sync: "content/products/*.md", url: "/products/:slug" });
export const categories = productCategory({ url: "/shop/:path" });
export const tags = productTag();
export const orders = order();

Optimistic cart client & React hooks

Whenever a project exports store(), typedpress build emits commerce.ts, cart-store.ts, and cart-react.ts in tp/_generated/client/. Call createCartHooks(React) to obtain useCart() and useCartCount() with optimistic item quantity updates and automatic rollback on failure.