Home WordPress Tutorial How to change Currency on Woocommerce Site

How to change Currency on Woocommerce Site

by tranglt

Each country will have different currencies. You need to change it on your website to suit the position as well as countries you want to sell your products. In this article, we are showing you some ways to change the currency in Woocommerce.

Change currency at Woocommerce Settings

From Dashboard => Woocommerce => Settings => General Tab => scroll down the page to Currency options

You can choose the currency, its position, thousand separator, decimal separator and number of decimals here

Adding a Custom Currency in Woocommerce.

If the currencies at the list of Currency options as in the image above aren’t suitable for your shop, please use the instruction below to see how to add a custom one.

Please go to the file function.php of your theme and paste the code below there and change the currency symbol and code as you want. After doing this, the new currency will be added to Woocommerce Settings.

add_filter( 'woocommerce_currencies', 'add_my_currency' );
 
function add_my_currency( $currencies ) {
$currencies['ABC'] = __( 'Currency name', 'woocommerce' );
return $currencies;
}
 
add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2);
 
function add_my_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'ABC': $currency_symbol = '$'; break;
}
return $currency_symbol;
}

We hope this article will help to save your time. In case, if you need help, just leave a comment below or submit a ticket, we are pleased to discuss with you.

You may also like

Leave a Comment