Woo Headless · Case study A fast storefront that the owner still runs from WordPress.
I lead the WordPress team at weLabs on Woo Headless, a Next.js store on Cloudflare Workers. A WordPress plugin, the Companion, fills the gaps in WooCommerce’s APIs and gives the owner one panel for everything shoppers see.
●Stripe · PayPal · wallets✓519 browser testsCheckout form 85 ms
Months5so far
My commits708
Browser tests519
Mobile score98
My role
WordPress team lead and developer
Team
6 engineers, 2 repositories
First client
Kahf, live in a week
Stack
Next.js, Cloudflare Workers, WooCommerce, PHP
01 — Timeline
1,179 commits, five months.
Pick a week to see what happened.
My commits (708)Team commits (471)
Week 15 · 107 mine · 38 teamProduct page settings, Google and Facebook sign-in, the Address Book and reviews with media.
02 — Platform
Ports and adapters, one boundary.
Any client’s WooCommerce store
Fast on a slow backend
Works with their payment plugins
Run by the owner from WordPress
The Port: Pages know only the storefront’s own types, reach the backend through the Port, split by capability, and hide whatever a backend declares absent.03 — Key decisions
Four pieces of work that shaped the platform.
The groundwork
Make WooCommerce work headless
My first job was the cart and checkout on a real WooCommerce store: Store API nonces, variable products, currency minor units and country address rules. The product page needed per-variation prices and stock, so the Companion got a public endpoint for them.
Store API · Companion routes
git log · the first three weeks
Day 1Companion plugin, first commitDay 2Cart through the commerce adapter; variable productsDay 3Coupons, shipping, country address rulesDay 4Payment moves onto the checkout pageDay 8Mini cart; live price and stock per variationDay 10Gallery, swatches, grouped products, brandsDay 18Orders attach to the customer; reorder✓ cart, checkout and product page on real WooCommerce
The owner’s panel
The store owner runs it from WordPress
A headless store risks putting every visual decision in code, so much of my work went into the Companion’s settings and a storefront that draws what they say. Colours, header, footer, home and product sections, pages and the phone tab bar are all set in WordPress.
StoreFront Settings · wp-admin
I rebranded the settings as StoreFront and added the search box that jumps straight to any field.
The checkout
The shopper never leaves the checkout
Card forms, PayPal’s button and wallet buttons all sit on the storefront’s own checkout, which WooCommerce payment plugins don’t expect. A decision record introduced the Processor: each method is offline, or embedded and owned by a Processor that hands the backend a token.
Stripe · 3-D Secure · PayPal · wallets
The card number never reaches our servers, and only the backend can mark an order paid.
For agents
An AI agent can run the store’s settings
I registered every settings section as a WordPress ability with a full schema, so an agent over MCP changes the store the way the settings screen does. SEO abilities write into Rank Math or Yoast when one is in charge, so the two always agree.
WordPress abilities · MCP
Settings abilities
Colours and footer
Trust badges and home sections
FAQ, contact and the tab bar
One catalog of sections, the screen and the agent ↓
SEO abilities
Find items with missing SEO
Fill it in for products, posts, pages, categories, tags and brands
Write into Rank Math or Yoast when they’re in charge
04 — Speed
Hiding a slow backend.
WordPress takes about 1.5 s to answer, and the cart and checkout can’t be cached, so I made them stop waiting for it. Flip the switch to compare.
98Mobile performance
Checkout form on screen~85 msA cached shell first; the cart streams in
Mini cart after Add to cart0.08–0.14 sCart changes show at once
Quantity change shows< 0.13 sQuick clicks fold into one write
“Place order” ready2.1–2.4 sPayment methods still need the backend
Also measured · after
~20 msCheckout, first byte
15 msLine removal shows
2.34 sLargest paint, mobile
2Tag cache shards
My own measurements against a WooCommerce backend; Lighthouse from a local build matched to the live demo. The backend didn’t get faster: the pages stopped waiting for it.
One pass covered every screen on phones and tablets; phones also got an app-style tab bar.
06 — Leading it
Six engineers, two repositories.
708 / 1,179commits are mine, with 148 of 298 merged pull requests, 159 of 307 issues and 24 of 57 decision records.
Each square is 1% of commitsMineTeam
What I built
The Companion’s start, the owner’s settings, the product page, embedded payments, sign-in and reviews, the agent abilities, and the Workers deployment and checkout speed.
What the team built
The ports-and-adapters monorepo, login on Auth.js and JWT, the React settings app and its header and footer builders, page caching, and the blog, wishlist and cart recovery.
Rules that keep money safe
One cart is charged once, PayPal and wallet payments must match the order total, and a decline never says why, so card testers can’t tell which numbers are live. Payment routes are rate-limited per shopper, and admins are warned when a payment plugin leaves its tested version range.
Tested before real money moved
Demo Mode has its own demo card, express buttons and 3-D Secure challenge, so the browser tests run the whole payment flow on every change. A weekly CI job runs the payment contract against real payment plugins, and a sandbox checklist covers real wallets and one-time codes.
Accounts and reviews
Google and Facebook sign-in fails closed and won’t open an existing account on an email match alone, and the Address Book sticks to the store’s selling countries. Reviews take photos, video, replies and votes, stored as WordPress comments so moderation stays in WooCommerce.
Orders and the quiet details
Shoppers get back-in-stock alerts, streamed downloads, invoices and an order lookup that shows the whole order only to its owner; editors get signed previews of unpublished products. The cookie banner follows Complianz’s settings, and names like “O’Brien” show as typed.
The load test that hung
Some cart and checkout requests hung for 55 to 90 seconds on almost no CPU, because on Workers a promise belongs to the request that started it. I narrowed our sharing to a single page view, patched OpenNext and wrote the rule down as a decision record.
Running the team
I turned the spec, QA findings and client requests into work someone could pick up, and cut the Companion’s releases from 1.0.0 to 1.5.1. The Port helped as much as any process, since people could stay on their side of a boundary; decision records and a shared glossary did the rest.
Claude Code, checked
689 of my 708 commits list Claude Code as co-author, checked by lint, the contract suite, the browser tests, the Companion’s 3,252 PHP test methods and a person reviewing every change. Three auditing agents, for the storefront, the Companion and payments, review the code and run safe checks against local sites.
The first client
Kahf’s BURAQ 6 pre-order store went live on this platform at kahf.co/store a week after its first commit. SSLCommerz, bKash and two languages went in as new capabilities on the Port, and the faster checkout built for Kahf came back as the shared cart and checkout work.
Non-merge commits on develop in both repositories, so Kahf’s launch branch isn’t counted; a squash-merged pull request counts as one. Counts measure activity, not effort, and test totals are tests defined, not a pass rate.