MIKHAIL NERI

Case study · Client under NDA

WooCommerce cart bridge

A source only WordPress plugin that hands a cart from one WooCommerce store to a partner store as a real pending order.

Role
Sole developer
Status
Delivered
Stack
WordPress, WooCommerce, PHP, Web Components, WC REST API, AES 256 GCM, PHPUnit, PHPStan
Scale
108 PHPUnit tests
Level 6 PHPStan

Summary

Problem
A UK DTC retail client runs two storefronts under separate brands and needed carts on one to check out on the other.
System
A Web Component drawer cart intercepts the native cart, maps local products to the partner store, and creates the order through the stock WooCommerce REST API with an Application Password encrypted at rest.
Outcome
Shipped with four checkout strategies, full WP CLI parity, and 108 PHPUnit tests at PHPStan level 6.

What needed to exist

A cart on one store that checks out on another.

A UK DTC retail client runs two storefronts under separate brands. Carts started on one had to become real orders on the other, without the shopper noticing a seam.

Architecture

Intercept the cart, map the products, create the order.

  1. Drawer cart

    A vanilla Web Component drawer intercepts the native cart and checkout, mobile first in three responsive tiers, with dark mode.

  2. Product mapping

    Local products map to the partner store through post meta.

  3. Real pending orders

    The destination order is created through the stock WooCommerce REST API, as a real pending order.

Integrations

Four checkout strategies, one plugin.

The plugin ships four checkout strategies and full WP CLI parity.

Security

The credential is encrypted at rest.

Requests to the destination store authenticate with a WordPress Application Password, stored encrypted at rest with AES 256 GCM.

Result

Shipped as a source only plugin.

PHPUnit tests
108
PHPStan
Level 6

108 PHPUnit tests at PHPStan level 6 cover the plugin, which shipped to the client as source only.

Building something like this?

Start a project

Headless commerce platform Next system