Woocommerce – Change currency depending on billing country

I’m trying to change the currency depending on the customer’s billing country. Is it possible to do that maybe with an override of the “tax calculation” function as it is updated when the customer change the country ?

At the moment, I have this function (function.php) :


function change_currency($client_currency){
global $woocommerce;
$country = $woocommerce->customer->get_country();
if($country == 'CH') {
    $client_currency = 'CHF'; //currency code
} else {
    $client_currency = 'EUR'; //currency code
return $client_currency;

Thanks for your help

Source: wordpress

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.