case 03 · WooCommerce stores · Cuba

Three stores,
one engine

Woodofy is a WooCommerce plugin that teaches a store how Cuba works: provinces, municipalities, zones and weight-based shipping. Three live stores share it. I have maintained, hardened and extended it since July 2026.

Livetubandeja.com ↗ · cocomarketshop.com ↗ · engimovcaribe.com ↗

engimovcaribe.com
Home page of engimovcaribe.com, a WooCommerce store for construction materials
cocomarketshop.com
Home page of cocomarketshop.com, a WooCommerce store
tubandeja.com
Home page of tubandeja.com, a WooCommerce store shipping across Cuba
3live stores
1 coresame code in all three
16provinces and their municipalities
What it is

A WooCommerce plugin with Cuban addresses, zones and shipping, plus a family of extensions

Starting point

The core has existed since 2025, created by the team; I joined in July 2026

My role

Location-based shipping, checkout fields, security, translation, packaging and extensions

// the challenge

WooCommerce
doesn't know Cuba

An out-of-the-box store asks for a country, a state and a postal code. In Cuba the customer picks a province and municipality, shipping depends on weight and zone, and each store ships from a different place.

You could solve it with patches on each site. With three stores that means three copies to fix every time. The answer was a single plugin that knows it all, plus small extensions for whatever each store needs on top.

01

Addresses

Province, municipality and postal code in the order the customer uses, at checkout and in My Account.

02

Shipping

Rates by weight and by zone, with each province assigned to its zone.

03

Origin

Each store ships from one place. The plugin compares the delivery province with the store's.

04

Maintenance

A fix in the core has to reach all three stores without touching each one by hand.

// walkthrough of an order

From checkout
to shipping

Five pieces of the plugin, in the order a customer meets them. Scroll down and see them one by one.

01 · address

Province, municipality and postal code

At checkout, when Cuba is selected, the municipality list is filtered by province. The postal code fills in by itself and is read-only. In My Account and in orders the municipality name is shown, not its code.

classic checkoutMy AccountHPOS orders
02 · zones

Each province in its zone

In the WooCommerce admin, each shipping zone lists the provinces it covers. A REST API exposes provinces and municipalities as public read-only, and leaves the postal code to administrators only.

shipping zonesREST API
03 · rate

Weight sets the price

A calculator takes the total weight, the configured threshold and the location's base cost. If the rate doubles per band, each weight threshold doubles the cost.

by weightby zone
04 · origin

Ships only from where it sells

The plugin resolves the store's province and checks that the delivery province fits. If it doesn't, it warns at checkout instead of charging for an impossible shipment. Woodofy LM adds the location selector to the catalog.

checkout validationWoodofy LM
05 · family

Extensions for what changes

The core is installed on all three stores. Woodofy LM filters the catalog by location, Woodofy Polylang, which today runs only on the demo store, shares one inventory across languages and Woodofy Stats shows sales analytics.

WoodofyLMPolylangStats
checkout · Cubastep 1 / 5
CountryCuba
ProvinceHolguín
Municipalityfiltered by province
Postal codefills in by itself
Delivery phonecustom field

field order: country, province, municipality, postal code

shipping zonesstep 2 / 5
Zoneassigned provinces
GET/provincias · public read
GET/municipios · public read
ADMIN/códigos postales · with permission

plugin REST routes, simplified names

weight-based ratestep 3 / 5
Cart weight1.2 kg
Weight bands× 1
Shippingbase

illustrative example: 1.3 kg threshold, no real prices

store originstep 4 / 5
Store provinceresolved from the setting
Delivery provincethe one at checkout
Do they match?yes · rate
If they don't matchwarning, no rate
→ validate_shipping_province_matches_store()
the Woodofy familystep 5 / 5
⬢ Woodofycore · on all 3 stores
⬢ LMcatalog by location
⬢ Polylanginventory across languages
⬢ Statssales analytics
// real problems

What breaks
while maintaining it

Six cases from my history in these repositories. Each card carries the commit that fixed it.

fix · 3577fbbimproved

A debug shortcut opened the API

With WP_DEBUG on, the REST API accepted a fallback nonce. I removed it: provinces and municipalities are public read-only and postal codes require administrator permission.

fix · 9906cc8improved

The log stored customer data

Two error_log calls dumped the checkout fields, including personal data, into debug.log. I removed them.

fix · 9906cc8improved

The admin script returned 404 in production

It was loaded from src/, which the distribution zip doesn't include. It now lives in assets/ and the packaging copies it.

fix · fc45b88improved

The municipality got lost in My Account

The saved address showed no municipality and orders displayed a code. It is now injected into the formatted address and resolved to its Spanish name.

fix · cb4b0a4improved

The postal code notice showed up twice

.woocommerce-checkout is also the body class, so the notice appeared above the header. It now targets only the form.

revert · 491361b1client's

An audit that touched code that wasn't mine

On one of the stores, the audit fixes reached the client's own plugins. I reverted them: those plugins are now read-only and the changes are kept as a patch.

// under the hood

One core,
three stores

Where a visit goes

customerCheckoutpicks province and municipality, and sees the shipping rate
store ownerWooCommerce adminzones, weight-based rates and store location
other systemsREST APIprovinces and municipalities, public read-only
// shared plugin

WooCommerce + Woodofy

Cuban addressesprovinces, municipalities, postal codesimproved
Shipping by weight and zonecalculator and shipping methodimproved
Woodofy LMcatalog by locationimproved
Woodofy Polylanginventory and emails by languagebuilt
Woodofy Statssales analyticsbuilt
WooCommerce and Polylangbase and translationsthird-party
development and packaging
Composer · wp-scripts · webpacknpm run zip · automatic versioning · improved
store 1tubandeja.comcore only
store 2cocomarketshop.comcore and location filter
store 3engimovcaribe.comcore and the client's own plugins
NewImprovedExisting
// method

Fix it
once

From one fix to three stores

The plugin is fixed in its repository, packaged with the version bumped automatically, and installed on each store. All three get the same code.

01Fixa change in the core
02Packagezip with a new version
03Installon all three stores

Rules I left in the plugin

Nonce on every AJAX requestalso in the handlers that aren't hooked up yet
Permissions on the REST APIpublic read only where needed
No customer data in the lognothing from checkout reaches debug.log
Complete Spanish translationplugin and admin texts in es_ES
Orders through the WooCommerce APIthe municipality is saved HPOS-compatible
// results

The plugin
in numbers

3live stores on the same core
16provinces, with their municipalities and postal codes
4plugins in the family: core, LM, Polylang and Stats
3versions released in a single day (1.0.7 to 1.0.9)

Figures taken from the code and git history of the repositories. I don't include store sales figures because they are not my result. A fourth site, also running Woodofy, is still in "coming soon" mode and isn't shown here.

WooCommerceWordPressPHPJavaScriptComposerwebpackREST APIPolylangHPOS
// your project

Want something like this for your business?

Tell me what you need. I reply within 24 hours and, if it is a fit, you get a fixed written proposal.