PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

How to add exchange rate in a product feed?

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 please
If 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.

I use a plugin to create a product feed for a price comparision site in Poland. Our store use EUR as default, while the Polish site requires us to use PLN in the feed. The plugin does not offer any way to manipulate the price, but I managed to create the feed in PLN by edition the coding of the feed plugin:

public function get_value( $source ) {
return number_format( round( 4.4539098739624 * wpdesk_get_price_including_tax( $source ), 2 ), 2, '.', '' );

The value 4.4539098739624 is the exchange rate PLN/EUR.

The problem with this coding is that I have to manually update the currency rate every day or week. How do I get the exchange rate as a"function/coding format"? Must be something like woocs_rate_PLN or something similar?

I know this is not a support issue about the plugin, but as a developer of the plugin I guess this is something that is easy to help me with?

Hello

Try  to  use  this  code

$price = wpdesk_get_price_including_tax( $source );

if (class_exists('WOOCS')) {

global $WOOCS;

$currrent = 'PLN'
if ($currrent != $WOOCS->default_currency) {
$currencies = $WOOCS->get_currencies();
$rate = $currencies[$currrent]['rate'];
$price = $price*$rate;
}
}