Introduction

This is a bug in WooCommerce where the symbol is not entered correctly into the markup.

The Solution

This issue should be resolved in Version 2.0 and later of WooCommerce. Please make sure your plugin is up to date!

Old Workaround

  1. Download a copy of the them and open ocmx/interface/general.php in a text or HTML editor
  2. Delete the entire contents of the file, then save it as woo.php (for HTML editors, ensure the PHP filetype is selected)
  3. Add the following code to the file, then save it again:
    <?php
    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;
    }
    ?>
  4. Upload this file to your server via FTP under wp-content/themes/cleansale/ocmx/interface/

Direct-edit Method (Novice users beware)

This is a Mod

This is considered a modification, so do it at your own risk! Make a backup of your existing file so you can replace it if something goes wrong and you need to start over.  Modified files WILL probably be replaced by a theme update at some point so keep note of your changes for future reference or see our guides below. Please note that we cannot assist you with modifying your theme or support problems you encounter as a result!

If you are modifying a theme as part of a client project, the following are really important!

How to Modify Your Theme the Right Way

How to Track Update Changes and Maintain Modifications

Elementor

Also note that any mistakes in editing this file will cause your site to become unavailable. Please have a copy of the theme on your computer in case you must restore the functions.php

  1. Go to Appearance > Editor
  2. Click on Theme Functions(functions.php)
  3. Scroll to the very bottom and add a new line after the very last character
  4. Copy and paste the following into the document
    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;
    }
  5. Ensure there are no blank spaces at the end of the document and click Update File

 

Elementor