
Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on April 9, 2020, 11:43
Hello Nick
For all currencies:
add_filter('woocs_currency_data_manipulation', 'woocs_currency_data_manipulation', 1, 1);
function woocs_currency_data_manipulation($currencies)
{
foreach ($currencies as $key => $value)
{
$currencies[$key]['rate'] = $value['rate'] + 0.10*$value['rate'];//add 10%
}
return $currencies;
}
Hello Nick
For all currencies:
add_filter('woocs_currency_data_manipulation', 'woocs_currency_data_manipulation', 1, 1);
function woocs_currency_data_manipulation($currencies)
{
foreach ($currencies as $key => $value)
{
$currencies[$key]['rate'] = $value['rate'] + 0.10*$value['rate'];//add 10%
}
return $currencies;
}

Pablo Borysenco(@pavlo_borysenco)
34,196 Posts
Quote from Pablo Borysenco on April 10, 2020, 11:00
Hello Nick
add_filter('woocs_currency_data_manipulation', 'woocs_currency_data_manipulation', 1, 1);
function woocs_currency_data_manipulation($currencies)
{
foreach ($currencies as $key => $value)
{
if ($key != 'YOUR_BASE_CURRENCY')
{
$currencies[$key]['rate'] = $value['rate'] + 0.10*$value['rate'];//add 10%
break;
}
}
return $currencies;
}
To customize the code, you should hire a developer
Hello Nick
add_filter('woocs_currency_data_manipulation', 'woocs_currency_data_manipulation', 1, 1);
function woocs_currency_data_manipulation($currencies)
{
foreach ($currencies as $key => $value)
{
if ($key != 'YOUR_BASE_CURRENCY')
{
$currencies[$key]['rate'] = $value['rate'] + 0.10*$value['rate'];//add 10%
break;
}
}
return $currencies;
}
To customize the code, you should hire a developer