Get a free, live brand consultation from our team to get started branding your business or securing your brand.
Connect with us after your consultation to propose a project or get answers to your project based questions.
Let's get started on your project! Our team will assist onboarding your project to make sure you are ready to develop.
$79.00 / year
The WooCommerce Distance Rate Shipping extensions allows you to easily offer shipping rates based on the distance or total travel time to your customer.
WooCommerce Distance Rate Shipping allows you to set up rules and charge rates based on the distance from your shipping location to the customer’s location.
Rules can be set up to charge shipping based on the distance and total travel time, or the number items in the cart, weight of the items, or the total value of the cart.
This extension requires a Google account as it makes use of Google Maps, the Google Distance Matrix API, and Google Maps Embed API. Some of these features are paid services. The route returned (and subsequent total distance) is used to calculate the cost according to the data returned by Distance Matrix API’s “Driving” Mode.
More information at: Install and Activate Plugins/Extensions.
The first step in setting up the WooCommerce Distance Rate Shipping extension is to generate an API key on Google, as the extension makes use of the Google Maps and Google Distance Matrix APIs.
Don't restrict key
Go to: WooCommerce > Settings > Shipping > Distance Rate.
As this extension makes use of Google Cloud service (Google Maps and Google Distance Matrix APIs), to ensure the extension work properly, you need to enable billing for your Google Cloud Project on the Google Cloud Platform:
Go to: WooCommerce > Settings > Shipping.
Select edit on the Shipping Zone that you want to add the method to
Select the Add shipping method button on the bottom of the Shipping methods section
Select Distance Rate from the dropdown and press Add shipping method:
Select the new Distance Rate method to configure the settings:
6/ Add Distance Rate Rules to define different settings for shipping.
Multiple rules can be set up with different options:
Note: Currently, Conditions can only be evaluated individually, not in combination with each other. For example, you can setup distance rules based on order total OR distance, but not order total AND distance.
For a workaround, see the custom snippet at the end of this documentation.
If you selected Total Travel Time, the travel time returned is an average time for the route.
Note: ranges cannot overlap.
A working example is:
A nonworking example is:
7/ Save changes.
Let’s say you offer a delivery service within a 50 mile range of your warehouse and want to have the Distance Rate API calculate a delivery cost based on distance traveled, you can set a Distance condition rule with a Max value of 50.
Any distance calculated at Checkout beyond 50 will not match the rule and an error message will be shown:
If you want to allow free shipping for closer deliveries (like the first 20 miles, for example) but charge for shipments further away than that, you can achieve this by adding a “0” cost rule for the free shipping distance (Min 0, Max 20) and then add another rule for distances beyond that (20.1 miles as the Min, Max can be left blank or assigned a range). In this second rule, set the “Cost Per Distance / Minute” amount that you want to charge (for $5 per mile, just enter 5 in that field), but add a negative amount in the “Fixed Cost” field that equals the number of miles in the free distance range multiplied by the cost per mile (20 * 5 = 100, so enter -100 as the fixed cost).
This can happen when Google Maps Embed API is not enabled for the project you created. Open the Google Developer Console and make sure that both Google Distance Matrix API and Google Maps Embed API are added to the project. Select the Enable APIs & Services button and search for each of the above APIs to enable them.
The functionality can be modified with the custom code snippet below. This uses an example of “Override rule cost for distance shipping when destination within 5miles of shop AND order total over $100”
There are no reviews yet.
Only logged in customers who have purchased this product may leave a review.
Copyright © 2022 – TroyCoLIVE – ALL RIGHTS RESERVED