Contents
Get Other Price Display - Plugixa Multi Currency for WooCommerce
GET /plugixa-multi-currency/v1/pro/price-extras
The Price in other currencies tab. See Price in other currencies.
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.
Note. Pro only: on the free plugin this route answers
404rest_no_route.
Request
GET https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/price-extras
Responses
200 OK.
{
"success": true,
"data": {
"other_prices": "list",
"currencies": ["EUR", "GBP", "JPY"],
"charged_notice": true
}
}
| Field | Type | Meaning |
|---|---|---|
other_prices |
string |
off, list (a line under the price) or details (a collapsed box) |
currencies |
string[] |
Currencies to show. Empty shows all of them |
charged_notice |
boolean |
For currencies charged in the store currency, say what will be charged |
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
rest_forbidden |
The caller lacks the capability: Sorry, you are not allowed to do that. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/price-extras" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/price-extras');
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/pro/price-extras', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share