Hello,
I am using WooCommerce for my wordpress to make it work as shopping site. I want to add one more currency but it doesn't have in settings. How can I add it?
Thanks
Printable View
Hello,
I am using WooCommerce for my wordpress to make it work as shopping site. I want to add one more currency but it doesn't have in settings. How can I add it?
Thanks
This functionality is not support by WooCommerce settings, you have to take their hook filter to add it.
Go to your theme folder and open file
Let 's say if you want to add Currency is VND and symbol is đ then you can add the code like this to functions.phpCode:functions.php
Refresh your WooCommerce admin then you should see new currency is VNDPHP Code:
add_filter( 'woocommerce_currencies', 'add_vnd_currency' );
function add_vnd_currency( $currencies ) {
$currencies['VND'] = __( 'VND', 'woocommerce' );
return $currencies;
}
add_filter('woocommerce_currency_symbol', 'add_vnd_currency_symbol', 10, 2);
function add_vnd_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'VND': $currency_symbol = 'đ'; break;
}
return $currency_symbol;
}
nice post,keep postiing