A WooCommerce rewrite: custom theme, React product page, rebuilt checkout
An online pet shop with thousands of products and three ways to buy the same bag of food. I moved it off a page builder onto a custom theme and rebuilt the product page in React, so changing size or purchase type no longer waits for the server.
0
Waits for the server when a shopper picks another bag size or way to buy
Network log of the live product page, 17 November 2026
88
Lighthouse performance, mobile
PageSpeed Insights on petbox.pl, 2 December 2026
100
Lighthouse accessibility, mobile
PageSpeed Insights on petbox.pl, 2 December 2026

Context
Petbox is a Polish online pet shop. Most of its money is in food bought on repeat. A customer can buy the same bag three ways: once, on a recurring delivery, or as a subscription to their pet’s daily need, where the shop works out when the bag will be empty and ships the next one before it is.
It reached me through Gophery in 2024. On the new theme I was the main developer, so its structure and standards were mine. Gophery’s lead tested the work, talked to the client and ran the infrastructure.
Problem and constraints
The shop ran on a theme built around a page builder. Templates lived in the builder rather than in code, so every change was manual, and the pages stayed heavy however much they were tuned.
The product page was the worst of it. Three purchase types, several sizes and a quantity field, and every change waited for a reply from the server before the price moved.
Decisions
Decision
Take the page builder out first, then rewrite the theme in one go.
Considered
- Keep the builder and strip out what was unused. Cheaper and quicker, but the weight comes from the builder itself, not from its settings.
Why
The builder came out in late 2024 and the new theme followed in 2025: templates in code, the logic split by what it does, and a real build step. That build is what later made React and TypeScript in the theme practical.
The cost was the size of the change. The rewrite went out in one piece, and some account screens shipped looking worse than they should have, because getting the theme out mattered more that month.
Decision
Rebuild the product summary in React, with every price worked out on the server and sent with the page.
Considered
- Keep the old front end and patch it. The least work, and every change would still have waited for the server.
- Fetch the same data when the component starts. One request instead of many, but still a wait before the buttons work.
Why
The server prepares everything the summary needs: every size, the price for all three purchase types, availability, cross-sells and the free delivery threshold. It goes out with the page. React reads it on load and never asks again, so changing size or purchase type is arithmetic in the browser. The server is asked only when something changes state, such as adding to the cart.
Set against the other ways to do it, React holds up. WooCommerce’s own variation form also sends prices with the page, but knows nothing about subscriptions or the daily-need price. WordPress’s Interactivity API, or Alpine.js on the Blade markup, would mean smaller scripts and markup rendered on the server. Both suit a few toggles better than a pricing model with three purchase types, sizes, quantities and a monthly cost per pet. React fits for two reasons. The panel is a small application, and TypeScript keeps its pricing model in check. And the cart and checkout already run on React, because that is what WooCommerce’s blocks are built with, so the shop has one way of building its interactive parts.
It cost a second language in the theme and a build step in the critical path. And a WordPress developer can no longer fix the product page without knowing React.
Decision
Extend WooCommerce's block cart and checkout rather than go back to the classic one.
Considered
- The classic checkout with template overrides, as the old theme had. Every extension point known, and no longer the one WooCommerce sets up by default.
Why
Gophery’s lead and I settled this together. The block checkout was new when the shop moved to it in mid-2025, and it had few places to hook into. The loyalty points, the eco packaging option and the cross-sells each had to be built as an extension of it.
Google Pay and Apple Pay open Stripe’s express checkout window, which cannot show a parcel locker picker. So before the delivery options reach that window, the list is cut to courier options. Parcel lockers stay in the normal checkout.
The cost: the blocks are WooCommerce’s, so any update can change what the extensions are built on.
Evidence





Outcome
The new theme has been in production since 2025, and the React product summary since 2026.
Lighthouse gives the home page 88 for performance on a phone. For a WooCommerce shop this size, with this many plugins and changes on top, I count that as a small miracle. It is a lab score for one page, though, not a measure of every visit.
Other work on the shop:
- an integration with the shop’s ERP system, so advertising can work from real purchase costs,
- product data prepared for a new sales channel,
- emails that tell a shopper a product they wanted is back in stock,
- products that leave “temporarily unavailable” by themselves when stock returns,
- a food calculator on the product page, filled in from the product description,
- buying as a company in the checkout, with the tax ID validated.
What I would not repeat
Shipping the rewrite as one change. It was the fastest way off the page builder. But nobody can review a change that size properly, and the account screens got the least attention.
Next time I would move one template at a time, with the old and the new theme side by side. Slower to start, safer to launch.
Building it on WooCommerce and a long list of plugins. Each plugin has its own idea of the cart and the checkout, and after launch most fixes were where two of them met. There was no time to replace them. The shop has grown a great deal since, and the ideas keep coming. Knowing that, I would write most of what the plugins do myself, or not build it on WooCommerce at all.