Contents
On this page
Dismiss Held Rate - Plugixa Multi Currency for WooCommerce
POST /plugixa-multi-currency/v1/pro/rates/{id}/dismiss
Reject a held rate. The currency keeps its current rate; the line stays in the history as rejected.
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
POST https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/rates/431/dismiss
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The held line, from held in Get Rate Alerts |
Request body
Content type: application/json
No body.
Responses
200 OK.
{
"success": true,
"data": {
"currency": "INR"
}
}
Errors
| Status | Code | When |
|---|---|---|
401 / 403 |
rest_forbidden |
The caller lacks the capability: Sorry, you are not allowed to do that. |
404 |
plugixa_multi_currency_rate_not_found |
The line is not held: This rate is not waiting for approval. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/rates/431/dismiss" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/rates/431/dismiss');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
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/rates/431/dismiss', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share