InMotion Hosting Support Center

Change WooCommerce currency from Euro to Dollar

Category: Wordpress

l.mahmoudi_55@yahoo.com
Asked:
2013-08-28 9:03 am EST

Hits: 6,216
I`m a beginner, I choose a ecommerce theme from woocommerce that the price is set to Euro, I want to change it to Dollar.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JacobIMH
Staff
9,968 Points
2013-08-28 9:28 am EST
Hello

Taking a look at the documentation from WooThemes on how to add a custom currency symbol, it looks like you should be able to change this to US dollars.

I believe your code would be:

add_filter( 'woocommerce_currencies', 'add_my_currency' );

function add_my_currency( $currencies ) {
$currencies['USD'] = __( 'US Dollars', 'woocommerce' );
return $currencies;
}

add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2);

function add_my_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'USD': $currency_symbol = '$'; break;
}
return $currency_symbol;
}


Please let us know if that works for you, or if you had any other questions at all.

- Jacob

You must login before you can post a comment about this answer.

I submitted this function into the .php but my wootheme is still showing a British Pound Symbol instead of the USD symbol on the top bar of my WooTheme 'Mystile'. Any clue how to change that tiny symbol to a USD? Do I need to edit the .html? If so...how?
joshrog
3 Points
2013-12-03 5:41 pm EST
Hello joshrog,

Did you add the code to your functions.php file? The documentation from WooThemes mentions that it does need to be in this specific .php file.

Also are you using any sort of WordPress caching plugin? You might need to clear your cache from the WordPress admin in order for the new currency symbol to begin appearing. But I don't think you'd have to go in and manually edit and HTML as the pages that WordPress generates are all stemmed from your index.php file and what your theme files code it to look like.

If you're still having issues, please let us know.

- Jacob
JacobIMH
9,968 Points
Staff
2013-12-03 7:33 pm EST
Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!