This plugin uses Google Matrix API to add custom fee based on distance between customers destination city and online stores location. Fee will be calculated by dividing the distance with user entered divider, and then multiplicated by the price. For example, if distance is 100km and the divider is 2 and price is 5 euros (Fee will be 5 euros for every 2 kilometers). The calculation formula will be (100 / 2) * 5 = 250 euros.
Installation instructions here.
If you are looking for a shipping method with distance based fee support, then use
this plugin instead.
Works with any currency and you can use either kilometers or miles.
You can use different logics, based on minimum and maximum distance or minimun cart price. Also fixed fee is available if the conditions are not met and you can disable the fee on virtual products. If you need to create your own logic, the filters to be used can be found here:
https://web-data.online/docs/woocommerce-distance-based-fee/
Plugin settings can be found at Settings - Distance based fee settings.
You need to have a Google API key in order to use this plugin. More info:
http://tiny.cc/aab75y
Google now also requires billing to be enabled for your account. Enable it here:
https://console.cloud.google.com/project/_/billing/enable
More info:
https://developers.google.com/maps/premium/new-plan-migration
This plugin requires WooCommerce version 3.2.0 or later.
Installing "WooCommerce distance based fee" can be done either by searching for "WooCommerce distance based fee" via the "Plugins > Add New" screen in your WordPress dashboard, or by using the following steps:
- Download the plugin via WordPress.org
- Upload the ZIP file through the 'Plugins > Add New > Upload' screen in your WordPress dashboard
- Activate the plugin through the 'Plugins' menu in WordPress
- Adjust settings at: Settings - Distance based fee settings