Contents
Remove Currency - Plugixa Multi Currency for WooCommerce
DELETE /plugixa-multi-currency/v1/currencies/{code}
Remove a currency from your list. Shoppers who had it selected see the store currency from their next page. Orders placed in it keep their currency and amounts.
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
DELETE https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/SEK
Path parameters
| Name | Type | Description |
|---|---|---|
code |
string |
The currency’s ISO code (EUR, any case) or its numeric id |
Responses
200 OK.
{
"success": true,
"data": {
"deleted": true
}
}
The plugixa_multi_currency_currency_deleted action runs with the code, and Pro forgets the currency’s charm pricing, payment methods and order limits. See Hooks.
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_base_locked |
It is the store currency: The store currency cannot be removed. Change it in WooCommerce settings first. |
Plus the errors every endpoint can return.
Examples
curl -s -X DELETE "https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/SEK" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/currencies/SEK');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
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/SEK', {
method: 'DELETE',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share