Tag: Symbol

How to add custom Currency or Symbol in WooCommerce 2.0

In order to add custom currency or symbol in WooCommerce 2.0+, add this code  in your theme file functions.php and  save your file. After saving changes currency/ symbol will be available from your WooCommerce settings. Add this code to functions.php file in WordPress theme 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; } Always keep this file while you update your theme exactly as it is.