Recently a new symbol was introduced for the Indian currency Rupee. WooCommerce already supports this symbol, but it shows as a box most of the times. This is because of lack of support for this new symbol in browsers as it was introduced only recently. One way to fix this issue is to replace the Rupee symbol with Rupee abbreviation, that is, Rs.
To do this, first open functions.php file of your theme, and add this code in it,
add_filter( 'woocommerce_currencies', 'agentwp_add_indian_currency' );
add_filter( 'woocommerce_currency_symbol', 'agentwp_add_indian_currency_symbol' );
function agentwp_add_indian_currency( $currencies ) {
$currencies['INR'] = 'INR';
return $currencies;
}
function agentwp_add_indian_currency_symbol( $symbol ) {
$currency = get_option( 'woocommerce_currency' );
switch( $currency ) {
case 'INR': $symbol = 'Rs.'; break;
}
return $symbol;
}
add_filter( 'woocommerce_currency_symbol', 'agentwp_add_indian_currency_symbol' );
function agentwp_add_indian_currency( $currencies ) {
$currencies['INR'] = 'INR';
return $currencies;
}
function agentwp_add_indian_currency_symbol( $symbol ) {
$currency = get_option( 'woocommerce_currency' );
switch( $currency ) {
case 'INR': $symbol = 'Rs.'; break;
}
return $symbol;
}
Now go to WooCommerce Settings page and you will see that the Indian currency symbol shows the Rupee abbreviation instead.
Save the WooCommerce settings once and the front-end will show the Rupee abbreviation Rs. instead of the Rupee symbol.