---
title: "Woodofy: one WooCommerce plugin for Cuba, three stores"
description: "Woodofy case: a WooCommerce plugin with Cuba's provinces, municipalities and weight or zone shipping, shared by three stores in production."
url: https://lazarosantana.dev/en/cases/tiendas/
---

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.

[View a store](https://tubandeja.com) [How it works](https://lazarosantana.dev/en/cases/tiendas/#recorrido)

Live [tubandeja.com ↗](https://tubandeja.com) · [cocomarketshop.com ↗](https://cocomarketshop.com) · [engimovcaribe.com ↗](https://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

**3** live stores

**1*core*** same code in all three

**16** provinces 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

Stores

[tubandeja.com](https://tubandeja.com), [cocomarketshop.com](https://cocomarketshop.com) and [engimovcaribe.com](https://engimovcaribe.com)

// 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 checkout My Account HPOS 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 zones REST 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 weight by 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 validation Woodofy 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.

Woodofy LM Polylang Stats

**checkout · Cuba** step 1 / 5

Country Cuba

Province Holguín

Municipality filtered by province

Postal code fills in by itself

Delivery phone custom field

field order: country, province, municipality, postal code

**shipping zones** step 2 / 5

**Zone** assigned provinces

**GET** /provincias · public read

**GET** /municipios · public read

**ADMIN** /códigos postales · with permission

plugin REST routes, simplified names

**weight-based rate** step 3 / 5

Cart weight **1.2 kg**

Weight bands **× 1**

Shipping **base**

illustrative example: 1.3 kg threshold, no real prices

**store origin** step 4 / 5

Store province resolved from the setting

Delivery province the one at checkout

Do they match? yes · rate

If they don't match warning, no rate

→ **validate_shipping_province_matches_store()**

**the Woodofy family** step 5 / 5

**⬢ Woodofy** core · on all 3 stores

**⬢ LM** catalog by location

**⬢ Polylang** inventory across languages

**⬢ Stats** sales 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 · 3577fbb` improved

### 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 · 9906cc8` improved

### The log stored customer data

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

`fix · 9906cc8` improved

### 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 · fc45b88` improved

### 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 · cb4b0a4` improved

### 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 · 491361b1` client'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

customer**Checkout** picks province and municipality, and sees the shipping rate

store owner**WooCommerce admin** zones, weight-based rates and store location

other systems**REST API** provinces and municipalities, public read-only

// shared plugin

### WooCommerce + Woodofy

Cuban addresses*provinces, municipalities, postal codes**improved*

Shipping by weight and zone*calculator and shipping method**improved*

Woodofy LM*catalog by location**improved*

Woodofy Polylang*inventory and emails by language**built*

Woodofy Stats*sales analytics**built*

WooCommerce and Polylang*base and translations**third-party*

development and packaging

Composer · wp-scripts · webpack npm run zip · automatic versioning · improved

store 1**[tubandeja.com](https://tubandeja.com)** core only

store 2**[cocomarketshop.com](https://cocomarketshop.com)** core and location filter

store 3**[engimovcaribe.com](https://engimovcaribe.com)** core and the client's own plugins

New Improved Existing

// 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.

01**Fix** a change in the core

02**Package** zip with a new version

03**Install** on all three stores

### Rules I left in the plugin

**Nonce on every AJAX request** also in the handlers that aren't hooked up yet

**Permissions on the REST API** public read only where needed

**No customer data in the log** nothing from checkout reaches `debug.log`

**Complete Spanish translation** plugin and admin texts in es_ES

**Orders through the WooCommerce API** the municipality is saved HPOS-compatible

// results

## The plugin in numbers

**3** live stores on the same core

**16** provinces, with their municipalities and postal codes

**4** plugins in the family: core, LM, Polylang and Stats

**3** versions 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.

WooCommerce WordPress PHP JavaScript Composer webpack REST API Polylang HPOS

// next case

04 · corporate website · custom solutions

### From a Figma design to a WordPress theme

The teknovud.com redesign taken from Figma to a complete theme: templates, editable fields and filters, with an audit at the end.

*teknovud.com*

Home page of teknovud.com

[Need something like this? → WooCommerce stores for Cuba](https://lazarosantana.dev/en/services/woocommerce-cuba/)

[Need something like this? → Custom WordPress plugin](https://lazarosantana.dev/en/services/custom-wordpress-plugin/)

[← all cases](https://lazarosantana.dev/en/#trabajo) case 3 of 4

// 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.

[Request a quote](https://lazarosantana.dev/en/contact/#form) [See services](https://lazarosantana.dev/en/services/)
