Here is a quick snippet to add new custom currency and symbol to wocommerce. Place the following snippet in functions.php within your theme folder. After adding this code your currency will be available in your WooCommerce settings page.

add_filter( 'woocommerce_currencies', 'add_my_custom_currency' );

function add_my_custom_currency( $currencies ) {
     $currencies['BOO'] = __( 'Your currency name', 'woocommerce' );
     return $currencies;
}

add_filter('woocommerce_currency_symbol', 'add_my_custom_currency_symbol', 10, 2);

function add_my_custom_currency_symbol( $currency_symbol, $currency ) {
     switch( $currency ) {
          case 'BOO': $currency_symbol = '$'; break;
     }
     return $currency_symbol;
}

Have any doubt, then comment here!

Leave a Reply

Your email address will not be published. Required fields are marked *