Change Currency Symbol in WooCommerce

If you want to change the currency symbol WooCommerce displays (e.g. replace “$” with “USD” or add a space), add the following code to your functions.php file. For more on WooCommerce hooks.

add_filter( 'woocommerce_currency_symbol', function( $symbol, $currency ) {
	switch ( $currency ) {
		case 'USD':
			$symbol = 'USD ';
			break;
		case 'GBP':
			$symbol = 'GBP ';
			break;
	}
	return $symbol;
}, 10, 2 );

Modify the case and $symbol values to match your needs.

Discussion
[  0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!