How to add custom currency in WooCommerce



If you want to add your currency which is not listed in WooCommerce, you can add it manually. 
Please don't try to do this if you don't have any development skill. 
To add a custom currency in WooCommerce 2.0+, copy and paste this code in your theme functions.php file and swap out the currency code and symbol with your own.


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;
}
Code is not affected by updates if using a child theme.
After saving changes, it should be available from your WooCommerce General settings. You can see your currency in the list of the currencies. 

Click save changes to store your changes. 


Previous
Next Post »