Setting up settings and API connection

Start setting up Distancr

After the installation of Distacr your start with configuring the options. Move to WooCommerce -> Settings -> Distancr -> Options.

Setting up settings and API connection 1

Distance Unit

Choose your distance unit. This will be used to measure the distance between your locations and the geolocation of your customers. Kilometers, Miles, and Nautical Miles are available.


Distancr relies on API-Partners to get the most exact geolocation of your customer. There are three providers available right now:

  • maxmind
  • ipstack
  • ipapi


You need to signup for an account here:

Which plan you choose is up to you, however, I recommend using the “Insights” plan for maximum precision. After you created an account and activated it from the e-mail, you will get access to your account dashboard.

There you can find your API key and your User ID. You have to fill out the API key field in Distancr with both:

Setting up settings and API connection 2

ipstack and ipapi

Both providers work exactly the same but follow a different pricing approach.

For ipstack you need an account here:

For ipapi you need an account here:

After you set up your account and logged in you can copy your license key directly from your dashboard. Copy and paste them into the Distancr API key field. That’s all!

Test Connection

When you have added your API key and saved the settings, you can use “Test Connection” to quickly check if the connection was successful. If it’s not you should check that you used the correct API provider and the correct API key in your settings.

Setting up settings and API connection 3


If you are using Distancr on a local machine you have to set a real IP to get the correct location for yourself. You can easily get your IP from the main page of (IPv4).

Setting up settings and API connection 4

Google Maps API Key

You can set up an API key as described here:

This is totally optional for Distancr and adds just a little bit more comfort for setting up locations. Instead of entering latitude and longitude for locations, you can autocomplete the address.

Setting up settings and API connection 5

Tip: make sure you have activated the Google Maps JavaScript API and the Google Places API.