Please add BNR selector
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from maleabil on August 1, 2019, 11:56Hi!
I need to have as a selector:
https://www.bnr.ro/nbrfxrates.xml
It worked for me in the previous versions by altering the ECB selector (code bellow). Now is not working anymore. Can you inlude it in your plugin into the future updates? My license has expired but i am prepared to buy a new one if you will include bnr selector, otherwise i can't use the plugin. Thank you!
case 'ecb':
$url = 'http://www.bnro.ro/nbrfxrates.xml';
if (function_exists('curl_init') AND $woocs_use_curl) {
$res = $this->file_get_contents_curl($url);
} else {
$res = file_get_contents($url);
}
$currency_data = simplexml_load_string($res);
$rates = array();
if (empty($currency_data->Body->Cube)) {
$request = sprintf(__("no data for %s", 'woocommerce-currency-switcher'), $this->escape($_REQUEST['currency_name']));
break;
}
foreach ($currency_data->Body->Cube->Rate as $xml) {
$att = (array) $xml->attributes();
$final['rate'] = (string) $xml;
$rates[$att['@attributes']['currency']] = floatval($final['rate']);
}
//***
if (!empty($rates)) {if ($this->default_currency != 'RON') {
if ($_REQUEST['currency_name'] != 'RON') {
if (isset($_REQUEST['currency_name'])) {
$request = floatval($rates[$this->escape($_REQUEST['currency_name'])] / $rates[$this->default_currency]);
} else {
$request = sprintf(__("no data for %s", 'woocommerce-currency-switcher'), $this->escape($_REQUEST['currency_name']));
}
} else {
$request = ($rates[$this->default_currency]);
$request = $request + $request * 1/100;}
} else {
if ($_REQUEST['currency_name'] != 'RON') {
if ($rates[$_REQUEST['currency_name']] < 1) {
$request = 1 / $rates[$_REQUEST['currency_name']];
} else {
$request = $rates[$_REQUEST['currency_name']];
}
} else {
$request = 1;
}
}
} else {
$request = sprintf(__("no data for %s", 'woocommerce-currency-switcher'), $this->escape($_REQUEST['currency_name']));
}
//***if (!$request) {
$request = sprintf(__("no data for %s", 'woocommerce-currency-switcher'), $this->escape($_REQUEST['currency_name']));
}
break;
Hi!
I need to have as a selector:
https://www.bnr.ro/nbrfxrates.xml
It worked for me in the previous versions by altering the ECB selector (code bellow). Now is not working anymore. Can you inlude it in your plugin into the future updates? My license has expired but i am prepared to buy a new one if you will include bnr selector, otherwise i can't use the plugin. Thank you!
case 'ecb':
$url = 'http://www.bnro.ro/nbrfxrates.xml';
if (function_exists('curl_init') AND $woocs_use_curl) {
$res = $this->file_get_contents_curl($url);
} else {
$res = file_get_contents($url);
}
$currency_data = simplexml_load_string($res);
$rates = array();
if (empty($currency_data->Body->Cube)) {
$request = sprintf(__("no data for %s", 'woocommerce-currency-switcher'), $this->escape($_REQUEST['currency_name']));
break;
}
foreach ($currency_data->Body->Cube->Rate as $xml) {
$att = (array) $xml->attributes();
$final['rate'] = (string) $xml;
$rates[$att['@attributes']['currency']] = floatval($final['rate']);
}
//***
if (!empty($rates)) {
if ($this->default_currency != 'RON') {
if ($_REQUEST['currency_name'] != 'RON') {
if (isset($_REQUEST['currency_name'])) {
$request = floatval($rates[$this->escape($_REQUEST['currency_name'])] / $rates[$this->default_currency]);
} else {
$request = sprintf(__("no data for %s", 'woocommerce-currency-switcher'), $this->escape($_REQUEST['currency_name']));
}
} else {
$request = ($rates[$this->default_currency]);
$request = $request + $request * 1/100;
}
} else {
if ($_REQUEST['currency_name'] != 'RON') {
if ($rates[$_REQUEST['currency_name']] < 1) {
$request = 1 / $rates[$_REQUEST['currency_name']];
} else {
$request = $rates[$_REQUEST['currency_name']];
}
} else {
$request = 1;
}
}
} else {
$request = sprintf(__("no data for %s", 'woocommerce-currency-switcher'), $this->escape($_REQUEST['currency_name']));
}
//***
if (!$request) {
$request = sprintf(__("no data for %s", 'woocommerce-currency-switcher'), $this->escape($_REQUEST['currency_name']));
}
break;
Quote from Pablo Borysenco on August 2, 2019, 10:56Hello
I will add it to next version.
But you can use - https://c2n.me/42TgDM5.png ( to get free API key - https://free.currencyconverterapi.com/free-api-key)
Result: https://c2n.me/42TgRpd
Hello
I will add it to next version.
But you can use - https://c2n.me/42TgDM5.png ( to get free API key - https://free.currencyconverterapi.com/free-api-key)
Result: https://c2n.me/42TgRpd