Distancr – Price by Location for WooCommerce


Distancr gives you the ability to set different prices for your products based on their current location.

This is really useful if you have an online store and a local shop and don’t want to argue about different pricing strategies online and offline.

It can also help to setup different prices for different regions within a country or to setup prices on a per country level.

The integrated rule editor provides an flexible and easy way to setup 2 pricing rules for your store.

The integrated location editor enables you to set multiple your location and configure them with your rules.



The pricing rule editor let you configure 2 rules for your location.

You can configure:

  • priority
  • location
  • distance (by unit)
  • compare (smaller/greater)
  • product categories to apply
  • price by percent (increase/decrease)
  • price by fix value (increase/decrease)
  • price by fix amount
  • decide which prices to modify (regular/sale/all prices)


Set your location with latitude and longitude or use Google Maps Autocomplete to find the right location.

If you need an easy way to find latitude or longitude values for your location, take a look here: latlong.net


The best testing tool for geolocation. Easily set your another location in the frontend and see how your prices modify in realtime.

This tool is only available for logged-in administrators and with active testing mode (activated by default).


To use Distancr you need an API key from one of these three providers:

In case of maxmind, you have to use the webservice.

Additional instructions on how to setup the API providers with Distancr can be found here: patrickposner.dev/docs/distancr/options/

Distancr Pro

There is also an pro version of Distancr which includes the following features:

Rule Editor

  • setup an unlimited number of global pricing rules

Multiple Locations

  • setup an unlimited number of different locations


  • block payment gateways by geolocation / geoip
  • hide products by geolocation / geoip
  • block shipping methods by geolocation / geoip

Pricing Per Product / Pricing Per Variation

  • set pricing rules per product
  • set pricing rules for each variation
  • overwrite global pricing rules


I regulary optimize the documentation and release extensive tutorials on how to use Distancr in a multitude of use-cases.

Learn more on patrickposner.dev/docs


The free support is exclusivly limited to the wordpress.org support form.
Any kind of e-mail and priority support requires a valid pro license.


The plugin is coded with modern PHP and WordPress standards in mind. It’s fully OOP coded.

It’s highly extendable for developers through several action and filter hooks.

Distancr keeps your website performance in mind. Every script is loaded conditionally and all input and output data is secured.


All major texts and information can be modified from the admin area of Distancr.

The plugin is fully translatable in your language. At the moment there are only en_EN and de_DE, but you can easily add your preferred language as a .po/.mo.

It’s also fully compatible with WPML and Polylang.


  • Distancr Pricing Rules
  • Distancr Locations
  • Distancr Options
  • Distancr Testing


Distancr is simple to install:

  1. Download the .zip’
  2. Unzip
  3. Upload the directory to your ‘/wp-content/plugins’ directory
  4. Go to the plugin management page and enable the Distancr Plugin
  5. Browse to WooCommerce->Settings > Distancr
  6. Customise your settings and your good to go!


March 31, 2021
I implemented this plugin during lockdown (corona pandemic) to keep my restaurant open for deliveries. Because in the Austrian Alps there are some houses offside this plugin helps me to create pretty individual pricing for the delivery. Because I'm not IT-expert I needed some help but the support here was superb. Thanks a lot, Patrick!
February 6, 2021
I use this plugin with a pizza-store. Normally you have minimum delivery prices, but with this plugin I can create special prices for special distances. this works great, because people don't get upset with minimum price but get perfectly fitting offers for their geolocation. Since I implemented this plugin we have more and wider customer to serve ... it literally pumped our business due to "covid-19 eat at home"-mentality. thanks!
January 15, 2021
It really was by accident that I came for this plugin searching the community for a powerful geomarketing tool. It absolutely fitted my needs and the support is more than fast and very competent. Thanks!
November 27, 2020
I'm completely overwhelmed by this simple, easy to use plugin ... With the pricing rule editor I have the possibility to configure my location-based prices very individual. For me the best and easiest way to start the geomarketing within my woocommerce-shop. Very nice!
November 27, 2020
I needed geolocation for presenting special products to special customers and came for this plugin because I'm using already the FILR-plugin of the same author and I'm very satisfied with it. After working with DISTANCR I can tell the same ... absolutely happy with this plugin and the use within woocommerce. Also the support is great, if you need help Patrick will come for you asap! I would give 6 stars but there are only 5 available 😉
Read all 6 reviews

Contributors & Developers

“Distancr – Price by Location for WooCommerce” is open source software. The following people have contributed to this plugin.


“Distancr – Price by Location for WooCommerce” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Distancr – Price by Location for WooCommerce” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.


1.1.6 + 1.1.7

  • better TM Extra Product options handling
  • preventing error if class not exists
  • bugfix for blocklist
  • removed comma to prevent error on some server configuration from apply_filters()
  • WP 5.8 + WooCommerce 5.4 check


  • prevent issues on some server configurations
  • improved IP checkup
  • improved performance
  • improved TM Extra Product Options support


  • product price apply bugfix
  • latest freemius sdk
  • WooCommerce Extra Product options compatibility
  • variation price calculation bugfix
  • fixed sanitizing issue
  • improved security with nonces for ajax


  • bugfix to delete all rules
  • integrated frontend testing tool
  • improved automatic blacklisting and API Usage


  • fixed product price comparison for reserved naming in linux


  • support for multiple shipping methods by method id


  • reducing API-Usage
  • Cleaner code and less conditionals
  • general location function in plugin main file.
  • added block ip’s option and blacklist
  • added write log function and option
  • updated translation
  • continue for correct pricing rules
  • easier debug mode
  • DEBUG constant for locations when logged in as admin.


Initial release.