Table of Contents
Start setting up Distancr
After the installation of Distacr your start with configuring the options. Move to WooCommerce -> Settings -> Distancr -> Options.
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:
You need to signup for an account here: https://www.maxmind.com/en/geoip2-precision-services
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:
ipstack and ipapi
Both providers work exactly the same but follow a different pricing approach.
For ipstack you need an account here: https://ipstack.com
For ipapi you need an account here: https://ipapi.com/
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!
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.
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 https://ipstack.com (IPv4).
Google Maps API Key
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.