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
- Download a copy of the them and open ocmx/interface/general.php in a text or HTML editor
- Delete the entire contents of the file, then save it as woo.php (for HTML editors, ensure the PHP filetype is selected)
- 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; } ?>
- 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!
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
- Go to >
- Click on Theme Functions(functions.php)
- Scroll to the very bottom and add a new line after the very last character
- 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; }
- Ensure there are no blank spaces at the end of the document and click Update File