Contents
On this page

Get Settings - Plugixa Multi Currency for WooCommerce

GET /plugixa-multi-currency/v1/settings

The plugin’s settings. See Settings.

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/settings

Responses

200 OK.

{
  "success": true,
  "data": {
    "settings": {
      "delete_data_on_uninstall": false,
      "setup_done": true,
      "auto_rates": true,
      "floating_switcher": true,
      "floating_position": "right",
      "cache_mode": "server",
      "geo_detect": true,
      "country_map": [],
      "switcher_product_page": true,
      "switcher_mini_cart": true,
      "switcher_auto_style": "pill"
    },
    "choices": {
      "site_timezone": "+00:00"
    }
  }
}
Field Type Meaning
settings.auto_rates boolean Update rates automatically. Daily by default; Pro offers other intervals
settings.floating_switcher boolean Show the floating currency button
settings.floating_position string right or left: the bottom corner of the button
settings.setup_done boolean Whether the first-run setup was finished. Read only in practice
settings.delete_data_on_uninstall boolean Erase the plugin’s data when it is deleted. See Privacy and uninstall
settings.cache_mode string Pro: server or cache_first. See Page caching
settings.geo_detect boolean Pro: pick the currency from the shopper’s country
settings.country_map object Pro: country overrides, country code to currency code, for example {"CH": "EUR"}
settings.switcher_product_page boolean Pro: show a switcher under the product price
settings.switcher_mini_cart boolean Pro: show a switcher in the mini-cart
settings.switcher_auto_style string Pro: the style of those two switchers, inline or pill
choices.site_timezone string The site’s time zone, from Settings > General in WordPress, for the admin screens. Not a setting of the plugin

The keys marked Pro are present only when Pro is installed and its app is on.

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/settings" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/settings');
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/settings', {
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share