Contents
On this page

Reorder Currencies - Plugixa Multi Currency for WooCommerce

POST /plugixa-multi-currency/v1/currencies/reorder

Set the order currencies appear in, in the switchers and on the Currencies screen. The store currency always stays first in lists.

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

POST https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/reorder

Request body

Content type: application/json

Field Type Required Description
codes string[] Yes Codes in the order you want. Codes not in your list are ignored; currencies you leave out keep their place value.
{
  "codes": ["USD", "EUR", "GBP", "JPY", "CAD", "AUD", "CHF", "INR"]
}

Responses

200 OK. data is every currency in the new order.

{
  "success": true,
  "data": [
    {
      "id": 1,
      "code": "USD",
      "enabled": true,
      "sort": 10,
      "symbol": "$",
      "position": "left",
      "decimals": 2,
      "thousand_sep": ",",
      "decimal_sep": ".",
      "flag": "US",
      "in_switcher": true,
      "rate": "1",
      "rate_source": "base",
      "rate_locked": true,
      "margin_pct": "0",
      "margin_fixed": "0",
      "rounding": {
        "price": {
          "step": "0",
          "mode": "nearest"
        },
        "shipping": {
          "step": "0",
          "mode": "nearest"
        },
        "fee": {
          "step": "0",
          "mode": "nearest"
        }
      },
      "checkout_mode": "selected",
      "rate_updated_at": "2026-11-19 16:05:53",
      "created_at": "2026-11-19 16:05:53",
      "updated_at": "2026-11-19 16:05:53",
      "name": "United States (US) dollar",
      "is_base": true
    },
    {
      "id": 2,
      "code": "EUR",
      "enabled": true,
      "sort": 20,
      "symbol": "€",
      "position": "right_space",
      "decimals": 2,
      "thousand_sep": ".",
      "decimal_sep": ",",
      "flag": "EU",
      "in_switcher": true,
      "rate": "0.9099181073",
      "rate_source": "ecb",
      "rate_locked": false,
      "margin_pct": "1",
      "margin_fixed": "0",
      "rounding": {
        "price": {
          "step": "0",
          "mode": "nearest"
        },
        "shipping": {
          "step": "0",
          "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:20:17",
      "name": "Euro",
      "is_base": false
    },
    "..."
  ]
}

Each currency gets sort 10, 20, 30 and so on, in the order sent. Fields as in List Currencies.

Errors

Status Code When
401 / 403 plugixa_multi_currency_forbidden The caller lacks the capability.

Plus the errors every endpoint can return.

Examples

curl -s -X POST "https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/reorder" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"codes":["USD","EUR","GBP","JPY","CAD","AUD","CHF","INR"]}'
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/reorder');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'codes' => ['USD', 'EUR', 'GBP', 'JPY', 'CAD', 'AUD', 'CHF', 'INR'],
    ]),
]);
$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/reorder', {
  method: 'POST',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ codes: ['USD', 'EUR', 'GBP', 'JPY', 'CAD', 'AUD', 'CHF', 'INR'] }),
});
const { data } = await response.json();

Quick Links

Share