Contents
On this page
Update Currency - Plugixa Multi Currency for WooCommerce
PATCH /plugixa-multi-currency/v1/currencies/{code}
Change a currency. Only the fields you send change; PUT and PATCH work the same way. id, code, name, is_base and the dates are ignored when sent. See Currencies and Margins and rounding.
Needs a user with the plugixa_multi_currency_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; see Capabilities.
Request
PATCH https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/JPY
Path parameters
| Name | Type | Description |
|---|---|---|
code |
string |
The currency’s ISO code (EUR, any case) or its numeric id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
enabled |
boolean |
No | Whether shoppers can use it. |
in_switcher |
boolean |
No | Whether it is offered in the switchers. |
symbol |
string |
No | The symbol, up to 16 characters. |
position |
string |
No | left, right, left_space or right_space. Anything else saves left. |
decimals |
integer |
No | 0 to 4. |
thousand_sep |
string |
No | Up to 4 characters. |
decimal_sep |
string |
No | Up to 4 characters. Empty saves .. |
flag |
string |
No | Two-letter country code, for example JP. |
rate |
string |
No | More than 0, with a dot for decimals. Ignored for the store currency. |
rate_source |
string |
No | Defaults to manual. |
rate_locked |
boolean |
No | true keeps the rate out of automatic updates. |
margin_pct |
string |
No | Percent added to the rate, more than -100 and up to 1000. |
margin_fixed |
string |
No | Fixed amount added to each product price. |
rounding |
object |
No | Rules for price, shipping and fee, each { step, mode }. A context you leave out gets no rounding. |
checkout_mode |
string |
No | selected or base. |
sort |
integer |
No | Its place in the list. Use Reorder Currencies to move several at once. |
rounding is replaced as a whole: send all three contexts you want to keep. For the store currency, the rate stays 1, it stays enabled and its rate stays locked whatever you send. Changing rate sets rate_updated_at to now.
{
"rounding": {
"price": {
"step": "10",
"mode": "up"
},
"shipping": {
"step": "10",
"mode": "nearest"
},
"fee": {
"step": "0",
"mode": "nearest"
}
}
}
Responses
200 OK. data is the currency as saved.
{
"success": true,
"data": {
"id": 6,
"code": "JPY",
"enabled": true,
"sort": 60,
"symbol": "¥",
"position": "left",
"decimals": 0,
"thousand_sep": ",",
"decimal_sep": ".",
"flag": "JP",
"in_switcher": true,
"rate": "158.64422202",
"rate_source": "ecb",
"rate_locked": false,
"margin_pct": "0",
"margin_fixed": "0",
"rounding": {
"price": {
"step": "10",
"mode": "up"
},
"shipping": {
"step": "10",
"mode": "nearest"
},
"fee": {
"step": "0",
"mode": "nearest"
}
},
"checkout_mode": "selected",
"rate_updated_at": "2026-11-20 16:20:17",
"created_at": "2026-11-19 16:05:53",
"updated_at": "2026-11-20 16:45:31",
"name": "Japanese yen",
"is_base": false
}
}
Every change rebuilds the list the storefront reads, so the next page shows the new prices. A page cache may still serve older pages: see Page caching.
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
plugixa_multi_currency_forbidden |
The caller lacks the capability. |
404 |
plugixa_multi_currency_not_found |
The currency is not in your list: This currency is not in your list. |
400 |
plugixa_multi_currency_invalid_number |
rate, margin_pct or margin_fixed is not a number: Enter numbers only, with a dot for decimals. |
400 |
plugixa_multi_currency_invalid_rate |
The rate is 0 or less: The exchange rate must be more than zero. |
400 |
plugixa_multi_currency_invalid_margin |
The margin must be between -100% and 1000%. |
500 |
plugixa_multi_currency_save_failed |
The database refused the save: The currency could not be saved. |
Plus the errors every endpoint can return.
Examples
curl -s -X PATCH "https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/JPY" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"rounding":{"price":{"step":"10","mode":"up"},"shipping":{"step":"10","mode":"nearest"},"fee":{"step":"0","mode":"nearest"}}}'
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/JPY');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'rounding' => [
'price' => [
'step' => '10',
'mode' => 'up',
],
'shipping' => [
'step' => '10',
'mode' => 'nearest',
],
'fee' => [
'step' => '0',
'mode' => 'nearest',
],
],
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/JPY', {
method: 'PATCH',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ rounding: { price: { step: '10', mode: 'up' }, shipping: { step: '10', mode: 'nearest' }, fee: { step: '0', mode: 'nearest' } } }),
});
const { data } = await response.json();
Quick Links
Share