# WooCommerce SvelteKit Storefront — Svelte Commerce Connector

> Svelte Commerce on WooCommerce: 27 of 43 services wired. Cart and checkout work through the Store API; sign-in cannot, as core has no endpoint for it.

- Canonical: https://kitcommerce.store/svelte-commerce/backends/woocommerce/
- Last updated: 2026-09-25

---

Svelte Commerce × WooCommerce

## Svelte Commerce on WooCommerce

WooCommerce is three APIs with three auth models: `wc/v3` with a consumer key and secret, the Store API `wc/store/v1` with a session Cart-Token — where the cart and checkout live — and WordPress core’s `wp/v2`. The connector uses all three.

- **27/43** services wired
- **@misiki/woocommerce-connector** 0.4.0
- **Cart** wired
- **Checkout** wired
- **Sign-in (auth)** no endpoint on the platform

### What works on WooCommerce today

Cart and checkout are wired through WooCommerce’s Store API, so shoppers can check out; they cannot sign in, because WooCommerce core has no endpoint that returns a shopper session. Read the note on the consumer key before deploying: the connector takes it from a `PUBLIC_` variable, which the browser receives.

#### Cart

Wired: issues a real request to WooCommerce.

#### Checkout

Wired: issues a real request to WooCommerce.

#### Sign-in (auth)

No endpoint on WooCommerce: it throws NotSupportedError rather than pretend.

**Known gaps:** `auth` (no core endpoint), `wishlist` — each is explained under Limitations below.

27 of 43 services wired, read from [CONNECTORS.md](https://github.com/itswadesh/svelte-commerce/blob/main/docs/CONNECTORS.md) on 21 September 2026, where the package version is recorded too; npm may carry a newer patch. Coverage is traced by a script in the Svelte Commerce repository: a service counts as wired only if it transitively issues an HTTP request, or delegates to one that does. It is not hand-asserted. Some services are Litekart-native concepts with no equivalent elsewhere (reels, deals, chat, gallery, popularity, demo-request, feedback, plugins, banner). They stay documented placeholders on every connector and are excluded from known gaps.

### Quick start

From nothing to a Svelte Commerce storefront reading WooCommerce. You need Node.js and a WooCommerce to point it at; the storefront holds no data of its own.

Clone it, choose the connector, point it at WooCommerce

```
# 1 — get the storefront
git clone https://github.com/itswadesh/svelte-commerce
cd svelte-commerce

# 2 — one connector at a time: remove the two the storefront ships with, add this one
npm uninstall @misiki/litekart-connector @misiki/vendure-connector
npm i @misiki/woocommerce-connector

# 3 — point it at your WordPress site
echo PUBLIC_WOOCOMMERCE_API_URL=https://your-store.example.com >> .env
echo PUBLIC_WOOCOMMERCE_API_KEY=ck_... >> .env
echo PUBLIC_WOOCOMMERCE_API_SECRET=cs_... >> .env

# 4 — run it
npm run dev
```

The guide removes only `@misiki/litekart-connector`. A fresh clone’s `package.json` also lists `@misiki/vendure-connector`, and with two connectors installed and neither of them Litekart’s, the build stops and asks for `PUBLIC_CONNECTOR` — so this removes both.

### Environment variables

*What Svelte Commerce reads to reach WooCommerce*

| Variable | Required | What it does |
| --- | --- | --- |
| `PUBLIC_WOOCOMMERCE_API_URL` | Yes | Your WordPress site’s URL. The connector adds `/wp-json/wc/v3`, `/wp-json/wc/store/v1` and `/wp-json/wp/v2`. Boot fails, naming this variable, if it is missing. |
| `PUBLIC_WOOCOMMERCE_API_KEY` | No | A WooCommerce REST API consumer key, sent as HTTP Basic to `wc/v3` — products, orders, coupons and customers. See the limitations. |
| `PUBLIC_WOOCOMMERCE_API_SECRET` | No | The consumer secret that goes with it. |
| `PUBLIC_CONNECTOR` | No | Only when more than one connector is installed: `@misiki/woocommerce-connector` names the one this build runs on. |

`init.ts` hands the connector every `PUBLIC_WOOCOMMERCE_*` variable that is set, camel-cased. The guide also lists `PUBLIC_WOOCOMMERCE_ACCESS_TOKEN`, `PUBLIC_WOOCOMMERCE_ACCESS_KEY`, `PUBLIC_WOOCOMMERCE_STORE_ID` and `PUBLIC_WOOCOMMERCE_CHANNEL_ID`; the connector’s source does not read them. The guide’s own example sets only the URL — the key and secret here are what `wc/v3` calls authenticate with.

Every variable here begins `PUBLIC_`, and SvelteKit sends `PUBLIC_` variables to the browser: treat each value you set as published.

### What to set up on WooCommerce

- Create a REST API key under WooCommerce › Settings › Advanced › REST API for `PUBLIC_WOOCOMMERCE_API_KEY` and `PUBLIC_WOOCOMMERCE_API_SECRET` — and read the limitations first.
- Keep pretty permalinks on: the connector calls `/wp-json/…` paths.
- Let the storefront’s origin make cross-origin requests to WordPress (CORS): in production the browser calls `PUBLIC_WOOCOMMERCE_API_URL` directly, not only the server.

### How the integration works

The connector reads the catalogue, orders, coupons and customers from `wc/v3` with the consumer key and secret; runs the cart and checkout through the Store API, `wc/store/v1`, where a session Cart-Token carries the basket; and reads pages from WordPress core’s `wp/v2`. Cart and checkout exist only in the Store API.

Installing the package is the whole switch. `vite.config.ts` resolves whichever `@misiki/*-connector` is installed, and `src/lib/core/connectors/init.ts` hands it every `PUBLIC_WOOCOMMERCE_*` variable that is set, camel-cased, at boot — in the server hook for server rendering and in the client hook for the browser, which must reach the same URL in production.

There is no Litekart API behind the storefront here, so store identity — name, logo, currency, menus, plugin toggles, theme colours — comes from `src/lib/core/connectors/default-store.json` merged under the default export of `kitcommerce.config.ts`. Until you override it, the store is called “Test”. Any Litekart REST path the connector still inherits is answered from that local data, or resolved empty, rather than requested.

### Limitations

- Sign-in (auth): throws `NotSupportedError` — WooCommerce has no core endpoint that returns a shopper session, and a stub that signed anyone in for any password would be an auth bypass, not a placeholder.
- Wishlist: not wired.
- Pages that depend on a service that is not wired render their empty state rather than failing.
- The consumer key and secret the connector sends to `wc/v3` come from `PUBLIC_WOOCOMMERCE_API_KEY` and `PUBLIC_WOOCOMMERCE_API_SECRET`. SvelteKit sends `PUBLIC_` variables to the browser, so every visitor to the store can read them and call `wc/v3` with whatever permissions the key has.
- Homepage sections other than the live product list come from the active theme’s static content — the standing rule for themes.
- The Conversational Shopping assistant is Litekart-only; its widget stays hidden when another connector is active.

### Troubleshooting

*Errors you may meet running Svelte Commerce on WooCommerce, and what fixes them*

| When you see | What to do |
| --- | --- |
| Boot fails with “the woocommerce connector is active but PUBLIC_WOOCOMMERCE_API_URL is not set” | Add `PUBLIC_WOOCOMMERCE_API_URL` to `.env`. A production Node build and Docker read `PUBLIC_*` from the process environment rather than `.env`, so set it on your deploy platform too. |
| The build stops with “Several commerce connectors are installed … Set PUBLIC_CONNECTOR to pick one” | More than one `@misiki/*-connector` is in `package.json` and none is Litekart’s. Uninstall the ones you do not run — a fresh clone also lists `@misiki/vendure-connector` — or set `PUBLIC_CONNECTOR='@misiki/woocommerce-connector'`. |
| Boot fails with “PUBLIC\_…\_API_URL is set, but it configures a different backend than the one this build runs on” | Another backend’s variable is still set, usually left over from the one you switched from. Remove it, or install that backend’s connector. `PUBLIC_LITEKART_API_URL` is exempt: it only points the dev proxy. |
| The store is called “Test”, or shows the wrong name and logo | Store identity is static on this backend. Set `name`, `logo`, `currencyCode` and the rest in the default export of `kitcommerce.config.ts`; `src/lib/core/connectors/default-store.json` lists every field. |
| `[woocommerce] no native implementation for get /api/...` in the console | The connector’s REST guard caught a path inherited from Litekart and answered it empty instead of requesting it. Each path is reported once. Harmless if WooCommerce has no such feature; if it has one, the fix belongs in the connector’s matching service. |
| `http proxy error: api/... ECONNREFUSED` in dev | A Litekart REST path was requested from outside the connector, so its guard never saw it. Vite proxies `/api` to `PUBLIC_LITEKART_API_URL`, or to `localhost:7000`. |
| The build fails on `@misiki/litekart-connector` | `@misiki/kitcommerce-core` declares it as a peer, and `vite.config.ts` redirects that specifier to whichever connector is installed. Make sure exactly one `@misiki/*-connector` is listed in `package.json`. |

### Before you rely on it

#### The one caveat that matters

Read this before choosing

Every connector was written by reading its platform’s authoritative source — an OpenAPI spec, a RAML file, a router registration or the controller source — rather than by running against a store. **No connector has been exercised against a live production instance of its platform.**

An open question for WooCommerce’s maintainers: Is there any supported path to customer login without a JWT plugin? Today `auth` throws, because `POST /customers` creates an account but returns no session.

[Offer a sandbox or a correction](https://github.com/itswadesh/svelte-commerce/discussions/new/choose)

FAQ

### Questions about Svelte Commerce on WooCommerce

**Can I run a WooCommerce store on Svelte Commerce today?**

Shoppers can browse, fill a cart and check out through WooCommerce’s Store API; they cannot sign in, and there is no wishlist. Before deploying, weigh the consumer key: the connector reads it from a PUBLIC\_ variable, which every visitor’s browser receives.

**How do I switch Svelte Commerce to WooCommerce?**

Remove the connectors the storefront ships with, install @misiki/woocommerce-connector, set PUBLIC_WOOCOMMERCE_API_URL in .env and start the dev server. vite.config.ts resolves whichever connector is installed, so no file in the storefront changes.

**Why can’t shoppers sign in on WooCommerce?**

WooCommerce core has no endpoint that returns a shopper session: POST /customers creates an account but hands back no session. Rather than fake one, the connector’s auth throws. The Svelte Commerce maintainers have asked WooCommerce’s maintainers whether a supported path exists without a JWT plugin.

**Has the WooCommerce connector been run against a real WooCommerce store?**

Not against a live production instance — no Svelte Commerce connector has been. It was written by reading WooCommerce’s authoritative API source, and the Svelte Commerce maintainers ask WooCommerce’s own maintainers for a sandbox to run it against.

### Sources

This page summarises WOOCOMMERCE.md in the Svelte Commerce repository and the WooCommerce connector’s source, read on 25 September 2026, and the coverage in CONNECTORS.md, read on 21 September 2026. Where they disagree with this page, they are right and this page is out of date. WooCommerce is a trademark of its owner, named here only to describe compatibility; no endorsement or affiliation is implied — see [trademarks](https://kitcommerce.store/about/#trademarks).

- [WOOCOMMERCE.md — the full guide for WooCommerce](https://github.com/itswadesh/svelte-commerce/blob/main/docs/WOOCOMMERCE.md)
- [CONNECTORS.md — coverage for all 26 connectors](https://github.com/itswadesh/svelte-commerce/blob/main/docs/CONNECTORS.md)
- [@misiki/woocommerce-connector on npm](https://www.npmjs.com/package/@misiki/woocommerce-connector)
- [WooCommerce](https://woocommerce.com)

### Read the whole guide

The storefront is the same on every backend; the connector is what changes. WOOCOMMERCE.md has the WooCommerce setup in full, beside the connector’s source.

[The WooCommerce guide on GitHub](https://github.com/itswadesh/svelte-commerce/blob/main/docs/WOOCOMMERCE.md) · [All 26 backends](https://kitcommerce.store/svelte-commerce/backends/) · [KitCommerce vs WooCommerce](https://kitcommerce.store/compare/kitcommerce-vs-woocommerce/)
