Indian currency not showing in WooCommerce

If your WooCommerce site doesn't display Indian currency correctly as shown above, just add below code in your function.php file.


add_filter( 'woocommerce_currencies', 'add_inr_currency' );
add_filter( 'woocommerce_currency_symbol', 'add_inr_currency_symbol' );

function add_inr_currency( $currencies ) {
$currencies['INR'] = 'INR';
return $currencies;
}

function add_inr_currency_symbol( $symbol ) {
$currency = get_option( 'woocommerce_currency' );
switch( $currency ) {
case 'INR': $symbol = '<i class="fa fa-inr"></i> '; break;
}
return $symbol;
}

Copyright © 2024 Siam Naulak.
magnifiercrossmenu