Viewing 9 replies - 1 through 9 (of 9 total)
  • There used to be a workaround. Try this please. I’m not sure if it works anymore.

    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 = 'Rs.'; break;
    	}
    	return $symbol;
    }
    Thread Starter masurana

    (@masurana)

    I tried this code but did not work. Thanks

    It’s older as I said.

    Try:

    
    add_filter('woocommerce_currency_symbol', 'inr_currency_symbol', 10, 2);
    
    function inr_currency_symbol( $currency_symbol, $currency ) {
    	switch( $currency ) {
    		case 'INR': $currency_symbol = '₹';
    			break;
    	}
    	return $currency_symbol;
    }

    Where you see the Rupee you will need to make sure the unicode is ‘& # 8 3 7 7 ;’
    I have separated them because the editor will think it’s exactly what it is.

    • This reply was modified 6 years, 2 months ago by stefsternyc.
    Thread Starter masurana

    (@masurana)

    Hi stefsternyc,
    Thanks.I added it in to snippet,but doesn’t work. Any other option to activate this code.

    So weird. I tested in mine and it works. Something in your theme maybe erasing it?

    Thread Starter masurana

    (@masurana)

    Okay,thanks.

    Do you have a language translation plugin?

    Thread Starter masurana

    (@masurana)

    No. I use Woocommerce Currency Switcher plugin.

    Thread Starter masurana

    (@masurana)

    Hi stefsterNYC,
    Now our issue is solved by solution below-
    Add to currency switcher plugin.
    Please add your sign – https://c2n.me/3XjkneE.png

    Result: https://c2n.me/3Xjktcu.png

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add New Indian Currency Symbol ?’ is closed to new replies.