Get in touch
  • WordPress
  • Shipping
  • v1.2.7

Ukrposhta — branch picker + rate for WooCommerce

A free Ukrposhta shipping plugin for WooCommerce: a branch-picker widget at checkout, a live rate via the eCom API, the postal index saved on the order.

Compatibility
WordPress 5.6+ / WooCommerce 6.0+
PHP
7.4 or newer
Updated
24 September 2026

The module in action — 44 sec

Clear even without sound: Ukrainian subtitles

What the module does

Feature Free
Choosing a Ukrposhta branch right in WooCommerce checkout ✔
A directory based on the official Ukrposhta Address Classifier ✔
Live shipping-cost calculation via the eCom API ✔
Cash-on-delivery fee — only for cash-on-delivery orders ✔
The chosen branch is visible on the order, in emails and on the thank-you page ✔
Cached directories for a fast checkout ✔
HPOS compatible ✔
Free ✔

What it looks like

Choosing a region in the Ukrposhta widget at WooCommerce checkout
The widget appears as soon as the customer chooses Ukrposhta delivery
Chosen Ukrposhta branch and live rate in the order summary
The chain is complete — the order summary immediately shows a live Ukrposhta rate, not a flat fee
Ukrposhta shipping method settings in WooCommerce
Method settings: Bearer token, sender index, service type, declared value, cash on delivery

Technical requirements

  • WordPress 5.6+ (tested up to 7.0)
  • WooCommerce 6.0+ (tested up to 10.7)
  • PHP 7.4+
  • An eCom agreement with Ukrposhta: your Ukrposhta account manager issues a Bearer key after the agreement is signed — it’s needed both for the address classifier and for rate calculation

Version history

v1.2.7 Current 24 September 2026

The Pro version activated next to the free copy from WordPress.org no longer loads the free copy’s code with PHP warnings on every request.

v1.2.6 24 September 2026

Uninstalling the plugin now also removes its settings (including the Ukrposhta API tokens) and the city search cache.

v1.2.5 24 September 2026

A guest who creates an account at checkout (or on the order confirmation page) no longer gets the Ukrposhta office as the new account’s address.

All versions (11)
v1.2.4 24 September 2026

The shopper’s saved account address is no longer replaced with the Ukrposhta office.

v1.2.3 24 September 2026

An Ukrposhta office picked earlier no longer leaks into an order shipped by courier or Nova Poshta (the “Ukrposhta post office” row in e-mails and on the order page).

v1.2.2 23 September 2026

The post-office picker now works on the block-based Checkout, where it did not appear at all.

v1.2.0 20 August 2026

International shipping calculation added.

v1.1.1 August 2026

Source strings moved to English, with Ukrainian shipped as a separate translation bundled with the plugin.

v1.1.0 August 2026

The live Ukrposhta rate is finally calculated.

v1.0.1 July 2026

Works on hosting without mbstring: city search and the parcel description no longer fail silently.

v1.0.0 July 2026

First public release: a branch picker (region → city → branch) at checkout and live rate calculation via the eCom API, with a fallback to a flat rate.

Full module description

Ukrposhta Shipping for WooCommerce is a Ukrposhta shipping plugin for WooCommerce stores. The customer picks a branch right in checkout via a region → city → branch chain, and the shipping cost is calculated live through Ukrposhta’s official eCom API. Data comes from the official Address Classifier, so the list of branches is always current, and the chosen postal index is saved on the order.

The plugin is completely free. The code is open — the repository is on GitHub (catcodestudio/woocommerce-ukrposhta-shipping), GPLv2 licence.

What it looks like to the customer

Once “Ukrposhta” is chosen as the shipping method at checkout, a widget appears: the customer picks a region, then a city, then a specific branch. As soon as a branch is picked, the plugin requests a rate from the eCom API (accounting for cart weight and the sender’s and recipient’s postal indices) and shows the real shipping cost. The widget’s accent colour can be adjusted to match your theme.

What the admin gets

The method is added to a WooCommerce shipping zone, and the credentials are global — one Bearer token for the whole store, regardless of how many zones you have. Settings include: a test environment (sandbox dev.ukrposhta.ua), the service type (Standard or Express), a default rate for when the API is unavailable, and a free-shipping threshold based on order total. The branch the customer picked is visible right on the order — a separate “Ukrposhta” block with the city, branch and index, plus a line in emails and on the thank-you page.

How it works, step by step

  1. The admin enters the eCom Bearer token and the sender’s postal index, and adds the “Ukrposhta” method to a shipping zone.
  2. At checkout, the customer chooses Ukrposhta delivery — a region → city → branch picker appears, based on the official Address Classifier.
  3. The plugin calculates the cart weight and requests a rate via the /domestic/delivery-price endpoint; if the API is unavailable, a flat rate from the settings is used instead.
  4. If the customer chose cash on delivery, Ukrposhta’s cash-on-delivery fee is added to the rate — and disappears the moment they switch to prepayment.
  5. If the order total exceeds the configured threshold, shipping becomes free.
  6. The customer places the order — the chosen branch’s postal index is saved on the order and available to the admin for shipping.

Under the hood

  • The Bearer key is stored encrypted at rest, and is never shown in plain text back in the settings form.
  • The branch directory is cached in a dedicated upwc_offices table, and the list of regions in a transient: checkout doesn’t hit the Ukrposhta API on every load.
  • HPOS (custom order tables) compatibility is officially declared; order meta is captured on both the classic checkout and the Store API (block) path.
  • The rate accounts for the weight of items in the cart, an optional declared value, and the cash-on-delivery fee — but only for payment methods you’ve marked as cash on delivery.
  • The chosen branch is part of the WooCommerce shipping package, so changing the branch or payment method recalculates the rate rather than showing a cached one.
  • City search understands Latin script: “Drohobych” finds Дрогобич.
  • Translation-ready: the text domain and all strings are ready for localisation.

How to install

  1. Download ukrposhta-shipping-for-woocommerce-1.2.7.zip and install it via “Plugins → Add New → Upload Plugin”.
  2. Activate the plugin — the branch cache table is created automatically.
  3. Go to WooCommerce → Settings → Shipping and add the “Ukrposhta” method to the zone you need.
  4. Enter the eCom Bearer token and the sender’s postal index, and save.
  5. Enable the method — the branch picker will appear at checkout.

Questions
about the module

Didn't find the answer? Message us on Telegram and we'll reply within a business day.

@catcode_support Setup, compatibility, activation
Can I ship with cash on delivery?

Yes. There's a "Cash-on-delivery payment methods" field in the settings — enter the IDs of your payment methods there (WooCommerce's standard method is cod). The plugin adds Ukrposhta's cash-on-delivery fee to the rate for those. Creating the waybill itself with cash on delivery is coming in the next update.

Why is the rate higher than on Ukrposhta's own calculator?

By default the plugin sends the order total as the declared value — Ukrposhta charges a percentage for this, but the parcel is insured. It can be switched off with a single checkbox in the settings.

Do I need an agreement with Ukrposhta?

Yes. Both the Address Classifier and rate calculation are authorised with a Bearer key that Ukrposhta issues after signing an eCom agreement.

Does it work with WooCommerce's block checkout?

The branch picker targets the classic checkout. Order meta is still captured on the Store API (block) path, and compatibility with cart/checkout blocks is declared.

Can the plugin create waybills and print labels?

Not yet. Creating a shipment (barcode/waybill), printing labels and cash on delivery are planned for the next update, once tested end-to-end on a live agreement.

What happens if the Ukrposhta API is temporarily unavailable?

Checkout won't break: a flat rate from the settings ("Default rate") is used instead of a live one.

Can I test it without a live key?

Yes, there's a Sandbox toggle in the settings — the plugin will work against the dev.ukrposhta.ua test environment.

What's left after deleting the plugin?

Deleting it removes the branch cache table and the plugin's options. Order meta (chosen branches) is kept — shipping history isn't lost.

Not quite what you are looking for?

We build custom modules for WordPress, WooCommerce, OpenCart and Shopify. Tell us about the task and we'll prepare an estimate.

Order a custom module