Not sure how to set up shipping? Let us help!
Learn moreFlexible Shipping Distance Based Shipping Rates adds two new conditions to your Flexible Shipping method: distance and duration. It uses Google Maps API to obtain reliable data to provide your customers with most precise shipping cost calculation. This is particularly useful when you offer your own shipping service.
Installation
Configuration
Flexible Shipping Distance Based Shipping Rates requires Flexible Shipping or Flexible Shipping PRO installed and activated.
To start configuration, go to WooCommerce → Settings → Shipping → Flexible Shipping Distance Based Shipping Rates

Google API Type – Distance Matrix API has been transitioned to Legacy status. In this case Google strongly encourages to use Routes API instead of Distance Matrix API. New customers are eligible to use Routes API.
API Key – fill this field with Google Maps API key in order to use distance and duration conditions in Flexible Shipping methods. To obtain a key please refer to this article.
In the project in Google Cloud Console go to APIs & Services > Enabled APIs & Services.

And ensure that the Routes API is enabled.

Distance Matrix API has been transitioned to Legacy status. In this case Google strongly encourage to use Routes API instead of Distance Matrix API.
API Connection Status – see the status of the API connection. Save plugin settings to reload.
Travel mode – choose between Driving, Cycling and Walking.
Distance Unit – choose between Imperial and Metric for better fit with your local requirements.
Origin – choose Store address to use Woocommerce address as an origin. Alternatively, provide custom address details after selecting Custom address.
Integrations – As part of a 3.0.0 update, there has been introduced integration with Dokan plugin and WCFM Marketplace plugin. The checkboxes are available only in the situation when they are installed and active. After ticking checkbox of Dokan or WCFM, address of the vendor from Dokan or WCFM instead of Origin store address is used by the Distance Based Shipping Rates plugin.
Please note: If you tick the checkbox of Dokan, and in the settings of user – Dokan settings are not filled out. The rules of Distance Based Shipping rates plugin won’t be working.
Please note: It is not recommended to use Dokan and WCFM integrations at the same time.
Examplary checkout can be found below:

Usage
In Flexible Shipping rules table new conditions will be available: Distance and Duration.

For each condition you can set a values range to calculate precise shipping cost. Distance and Duration can be combined with any other cost calculation rules condition.
Additional Cost
Flexible Shipping Distance Based Shipping Rates enables adding the ‘Additional cost’ field. This can be done by hovering over a field next to the rule cost. You will see a “plus” button:

As a result you will get:

Troubleshooting
- Connection error: Your request was denied. Incorrect authentication?

If you encountered the following problem when connecting to Google Maps API, then please follow these steps:
- Log in to your Google Cloud Platform account: https://console.cloud.google.com/
- Navigate to the “APIs & Services” section and click on “Credentials.”
- Find your API key and click on the edit icon.
- Ensure that there are no restrictions that could be blocking the API key from working with your website. If you have set any restrictions, make sure that your website’s URL is included in the list of allowed referrers.
- Double-check that all the characters in the API key are entered correctly in the plugin settings.
If the issue persists after following these steps, please contact Google support directly, to verify your API key.
Flexible Shipping Distance Based Shipping Rates – Tutorial videos
We understand the importance of guiding our customers through comprehensive videos. Therefore, we have developed our YouTube channel, so you can find there various videos, in case you need assistance, while dealing with our plugins.
WordPress plugin installation
This video can guide you through each step of plugin installation, ensuring you can enhance your website’s functionality with ease:
WordPress plugin installation issues
This video can help you address common plugin installation issues and provides step-by-step solutions to fix them:
Flexible Shipping Free
In this video, you can find in-depth tutorial of free version of Flexible Shipping. It shows initial configurations, setting up calculation rules, and other features that can help optimize your online store’s shipping options without any additional cost.
WooCommerce Shipping Zones
In this video you can learn how to configure WooCommerce shipping zones step by step.
WooCommerce shipping options
In this quick tutorial, we cover the basics of configuring WooCommerce shipping options in under five minutes.
How to use & choose a WordPress plugin
In this video, you can learn about making the most of WooCommerce plugins.
How to Set Up Distance-Based Shipping for Multivendor in WooCommerce? Step-by-step guide
In this video, we introduce Distance-Based Shipping Rates for WooCommerce – now fully integrated with Dokan and WCFM Marketplace!