A Blog about latest jobs updates, trending topics and different ways of earning money online.

How to add new currency in woo commerce WordPress

 

add new currency in WordPress
How to add new currency in woo commerce WordPress shop or how to edit currency symbol in WordPress.

To add new Currency Login your Cpanel and Go to File Manager.

In File Manager Goto Public html -> Wp-content -> themes -> [your theme] -> function.php

Edit your function.php file.

Edit currency name in wordpress

Now in function .php file add following code.

add_filter( 'woocommerce_currencies', 'add_my_currency' );

function add_my_currency( $currencies ) {

     $currencies['BHD'] = __( 'Bahraini Dinar', '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 'BHD': $currency_symbol = 'BHD'; break;

     }

     return $currency_symbol;

}



Previous
Next Post »

Popular posts