Get the #1 Action Upsell App 💰 Over $75m in upsells!Add to Shopify

Increase revenue 50% 💰 with upsells!Get App

How to Auto Change Currency Based on Customers Location in Shopify

SellUp Shopify Upsell App

Last Updated on January 7, 2022 by LAUNCHTIP

How to auto change currency based on customers’ locations in Shopify

If you get a lot of international customers, it only makes sense to display the currency according to their locality. It will make your customers feel at home while saving their time that they’d otherwise have to spend on converting the USD to their country’s currency. 

In this guide, we discuss a method to auto change the currency based on your customers’ location in Shopify. Keep in mind that this method requires a currency switcher. So, you must be using it. Plus, the method also requires you to use JQuery – almost all Shopify store owners do. 

How to auto change currency in Shopify

  • Go to the theme.liquid in your Shopify admin and paste the following code. 

   jQuery.getJSON('http://freegeoip.net/json/';, function(location) {

   // check if a user is from Israel

  if (location.country_code == 'IL') {




  // add more countries here


  • You must add the currency in theme settings, allowing it to be changed when someone comes to your store from a different location. 
  • If the script mentioned above does not work for you, use this altered code instead: 

jQuery.ajax( { 

  url: '//freegeoip.net/json/', 

  type: 'POST', 

  dataType: 'jsonp',

  success: function(location) {

    // If the visitor is browsing from Canada.

    if (location.country_code === 'CA') {

      // Change currency to CAD.





} );


After doing this, you can check if it’s working. To do that, use the Hola extension in Chrome to trick the site into believing that you’re from another country. This way, you can check if the currency changes automatically when you come to the Shopify store. 

If none of these scripts seem to work for your store, get in touch with a Shopify expert for more information on the subject. 


SellUp Shopify Upsell App

More To Explore