Contents
On this page
List Supported Currencies - Plugixa Multi Currency for WooCommerce
GET /plugixa-multi-currency/v1/currencies/catalogue
Every currency WooCommerce knows, with the formatting Add Currency fills in for it. Use it to offer a list of codes to add.
Needs a user with the plugixa_multi_currency_view capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; see Capabilities.
Request
GET https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/catalogue
Responses
200 OK. data lists every supported currency, sorted by code.
{
"success": true,
"data": [
{
"code": "AED",
"name": "United Arab Emirates dirham",
"symbol": "د.إ",
"position": "right_space",
"decimals": 2,
"thousand_sep": ".",
"decimal_sep": ",",
"flag": "AE"
},
{
"code": "SEK",
"name": "Swedish krona",
"symbol": "kr",
"position": "right_space",
"decimals": 2,
"thousand_sep": " ",
"decimal_sep": ",",
"flag": "SE"
},
"..."
]
}
Fields have the meaning they have in List Currencies. The list includes the currencies you already use.
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 "https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/catalogue" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/catalogue');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$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/catalogue', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share