Commit b9c61b4d030 for woocommerce
commit b9c61b4d0305a3e30e5f9ad7fb230cc2ddc24f8f
Author: Cvetan Cvetanov <cvetan.cvetanov@automattic.com>
Date: Wed Aug 5 16:31:09 2026 +0300
Correct Zambian kwacha currency symbol (#66722)
Fix Zambian kwacha display symbol to use K instead of ZK
ZMW arrived in 2016 as one row of a bulk pass that added 109 currencies,
and the ZK it was given carries no recorded rationale in that commit or
anywhere since. It has shipped that way for about ten years.
CLDR defines the kwacha symbol as K in the en-ZM locale, which is the
locale WooCommerce itself assigns to Zambia, and lists ZK only as the
narrow form. Zambian merchants write prices as K100. The currency map
already prefers a local glyph over an ISO-style abbreviation elsewhere,
mapping the Papua New Guinean kina to K.
get_woocommerce_currency_symbol( 'ZMW' ) now returns K, which changes the
symbol served by the REST currencies endpoint, the Store API currency
formatter, the V4 order and refund schemas, and the currency selector
label. Flat-rate, free-shipping, and local-pickup costs strip the active
symbol when a merchant saves them, so a ZMW store now needs K 10 where it
previously accepted ZK 10. Costs already saved are untouched, since
sanitization runs only on save. Stores wanting the old glyph can restore
it through the existing woocommerce_currency_symbol filters.
Refs #40931
diff --git a/docs/apis/rest-api/v2/setting-options.mdx b/docs/apis/rest-api/v2/setting-options.mdx
index d8505f675e3..cf42451c1ab 100644
--- a/docs/apis/rest-api/v2/setting-options.mdx
+++ b/docs/apis/rest-api/v2/setting-options.mdx
@@ -1278,7 +1278,7 @@ woocommerce.get("settings/general").parsed_response
"XPF": "CFP franc (Fr)",
"YER": "Yemeni rial (﷼)",
"ZAR": "South African rand (R)",
- "ZMW": "Zambian kwacha (ZK)"
+ "ZMW": "Zambian kwacha (K)"
},
"tip": "This controls what currency prices are listed at in the catalog and which currency gateways will take payments in.",
"value": "USD",
@@ -1916,7 +1916,7 @@ woocommerce.post("products/22/settings/general/batch", data).parsed_response
"XPF": "CFP franc (Fr)",
"YER": "Yemeni rial (﷼)",
"ZAR": "South African rand (R)",
- "ZMW": "Zambian kwacha (ZK)"
+ "ZMW": "Zambian kwacha (K)"
},
"tip": "This controls what currency prices are listed at in the catalog and which currency gateways will take payments in.",
"value": "GBP",
diff --git a/docs/apis/rest-api/v3/setting-options.mdx b/docs/apis/rest-api/v3/setting-options.mdx
index 9da4b4be38d..015a30d32da 100644
--- a/docs/apis/rest-api/v3/setting-options.mdx
+++ b/docs/apis/rest-api/v3/setting-options.mdx
@@ -1284,7 +1284,7 @@ woocommerce.get("settings/general").parsed_response
"XPF": "CFP franc (Fr)",
"YER": "Yemeni rial (﷼)",
"ZAR": "South African rand (R)",
- "ZMW": "Zambian kwacha (ZK)"
+ "ZMW": "Zambian kwacha (K)"
},
"tip": "This controls what currency prices are listed at in the catalog and which currency gateways will take payments in.",
"value": "USD",
@@ -1923,7 +1923,7 @@ woocommerce.post("products/22/settings/general/batch", data).parsed_response
"XPF": "CFP franc (Fr)",
"YER": "Yemeni rial (﷼)",
"ZAR": "South African rand (R)",
- "ZMW": "Zambian kwacha (ZK)"
+ "ZMW": "Zambian kwacha (K)"
},
"tip": "This controls what currency prices are listed at in the catalog and which currency gateways will take payments in.",
"value": "GBP",
diff --git a/plugins/woocommerce/changelog/fix-40931-zambian-kwacha-symbol b/plugins/woocommerce/changelog/fix-40931-zambian-kwacha-symbol
new file mode 100644
index 00000000000..91dc2b12e44
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-40931-zambian-kwacha-symbol
@@ -0,0 +1,4 @@
+Significance: patch
+Type: fix
+
+Correct the Zambian kwacha currency symbol from ZK to K. This changes the public symbol returned by currency APIs and the symbol recognized when saving flat-rate shipping costs.
diff --git a/plugins/woocommerce/includes/wc-core-functions.php b/plugins/woocommerce/includes/wc-core-functions.php
index 3d65e931800..44b41e612be 100644
--- a/plugins/woocommerce/includes/wc-core-functions.php
+++ b/plugins/woocommerce/includes/wc-core-functions.php
@@ -696,7 +696,8 @@ function get_woocommerce_currency_symbols() {
'XPF' => 'XPF',
'YER' => '﷼',
'ZAR' => 'R',
- 'ZMW' => 'ZK',
+ // CLDR uses K for en-ZM and ZK for its narrow representation.
+ 'ZMW' => 'K',
)
);
diff --git a/plugins/woocommerce/tests/e2e/data/settings.ts b/plugins/woocommerce/tests/e2e/data/settings.ts
index d7b107b675d..e08a1870456 100644
--- a/plugins/woocommerce/tests/e2e/data/settings.ts
+++ b/plugins/woocommerce/tests/e2e/data/settings.ts
@@ -169,7 +169,7 @@ export const currencies = {
XPF: 'CFP franc (XPF) — XPF',
YER: 'Yemeni rial (﷼) — YER',
ZAR: 'South African rand (R) — ZAR',
- ZMW: 'Zambian kwacha (ZK) — ZMW',
+ ZMW: 'Zambian kwacha (K) — ZMW',
};
export const externalCurrencies = {
@@ -334,7 +334,7 @@ export const externalCurrencies = {
XPF: 'CFP franc (Fr)',
YER: 'Yemeni rial (﷼)',
ZAR: 'South African rand (R)',
- ZMW: 'Zambian kwacha (ZK)',
+ ZMW: 'Zambian kwacha (K)',
};
export const stateOptions = {
diff --git a/plugins/woocommerce/tests/e2e/tests/api-tests/data/data-crud.test.ts b/plugins/woocommerce/tests/e2e/tests/api-tests/data/data-crud.test.ts
index 2ce4f0839af..9d235d093cb 100644
--- a/plugins/woocommerce/tests/e2e/tests/api-tests/data/data-crud.test.ts
+++ b/plugins/woocommerce/tests/e2e/tests/api-tests/data/data-crud.test.ts
@@ -8263,7 +8263,7 @@ test.describe( 'Data API tests', () => {
expect.objectContaining( {
code: 'ZMW',
name: 'Zambian kwacha',
- symbol: 'ZK',
+ symbol: 'K',
_links: {
self: [
{
diff --git a/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php b/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php
index b598d649690..0fcbaf159ec 100644
--- a/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php
+++ b/plugins/woocommerce/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php
@@ -229,6 +229,7 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case {
// Given specific currency.
$this->assertEquals( '£', get_woocommerce_currency_symbol( 'GBP' ) );
$this->assertEquals( 'MOP$', get_woocommerce_currency_symbol( 'MOP' ) );
+ $this->assertSame( 'K', get_woocommerce_currency_symbol( 'ZMW' ), 'The Zambian kwacha should use its local display symbol.' );
// Each case.
foreach ( array_keys( get_woocommerce_currencies() ) as $currency_code ) {