§ 04.24 — Pixy Puala · E-commerce · Revenue integrity · 2026

Resilient WooCommerce Commerce System

WOOCOMMERCE · INTEGRATION SAFETY

A storefront can look finished while checkout, inventory, tax, shipping and third-party webhooks stay brittle. This system ignores styling entirely and hardens the revenue-critical boundaries with idempotency and explicit, tested invariants.

Maintainer
Pixy Puala
Vertical
E-commerce · Revenue integrity
Year
2026
Role
Open source
Stack
WordPress
Status
● Public repo
§ 04.24.B

Problem

What was broken

Revenue is lost at the seams, not on the product page. A retried webhook double-books an order; two concurrent checkouts oversell the last unit; float arithmetic drifts a tax total by a penny per line; a refund path lets you return more than was captured. Each is invisible in a design review and expensive in production.

§ 04.24.C

Constraints

Boundaries · published
01 Engagement Open source · authored and maintained
02 Stack WordPress · WooCommerce · PHP 8.1+
03 Scope Integration safety · not storefront styling
04 Audience Retailers · WooCommerce agencies · integrators
§ 04.24.D

Decisions

Three · defended
Decision · 01

Webhooks land in a replay-safe inbox

Every inbound webhook is signature-verified and written to an atomic dedup store backed by a database unique constraint. A replayed delivery is accepted and ignored, not processed twice — and the E2E test proves it against a real MySQL.

Decision · 02

Money is integer minor units, never floats

The tax calculator works in pence/cents throughout. Float arithmetic is not "close enough" on a line-item total that gets multiplied and summed hundreds of times a day.

Decision · 03

Invariants are enforced, not documented

Stock cannot go oversold, a refund can never exceed what was captured, and order-state transitions are a closed set. These are unit-tested rules in code rather than notes in a wiki.

§ 04.24.E

Build

Stack · tooling · what it runs on

Stack

  • WordPress · WooCommerce extension APIs
  • PHP 8.1+ · Composer
  • $wpdb-backed atomic dedup store · MySQL
  • HMAC signature verification · timestamp window
  • REST API route · webhook inbox
  • PHPUnit · Playwright · wp-env
  • GitHub Actions · dedicated E2E workflow

Tooling

  • ✓ kept Composer · wp-env · GitHub Actions · MySQL fixture
§ 04.24.F

Results · Measured

Countable facts · from the repository
Unit tests
59 passing
signature · replay · stock · tax · refunds
Live E2E
4 paths
accepted · duplicate · bad sig · stale
Tax arithmetic
0 floats
integer minor units

The webhook path is proven against a booted WordPress + MySQL via tests/e2e/webhook-e2e.sh in CI, with the dedup table asserted at the database level. Audit trail in docs/audit/.

§ 04.24.G

Tradeoffs

What was not fixed

Only the webhook path is live-tested. The order-sync adapter against real WC_Order objects, calculators bound to live carts, an operations console UI and Playwright checkout journeys are documented as unbuilt. Stating that boundary is the point: the tested surface is exactly as wide as the claim.

Want this shape in your stack? The code is public. The judgement is the service.

Read the source → Start a project