Cost by Region
The Shipping cost by Region feature for WooCommerce provided by LPAC lets you draw regions on a Google map and set prices for them. When a customer falls within any of your drawn regions, WooCommerce will automatically update the shipping method to reflect the cost set for the shipping region.
If a customer falls within two or more regions that intersect, LPAC will use the highest shipping cost available.
Set the Shipping Methods that Shipping Regions should apply to. Shipping Methods are attached to Shipping Zones in WooCommerce. You can create a general Shipping Zone for your country, attach a custom Shipping Method to it with any name that you like, then create Shipping Regions in the LPAC settings for your country and attach that previously create custom Shipping Method to LPAC.
You can create multiple Shipping Zones, each with their own unique custom Shipping Method that you wish to attach to LPAC; Once done, you can then draw Shipping Regions for all of those previously created Shipping Zones and attach all the relevant Shipping Methods to LPAC, the plugin will automatically match the correct shipping cost for the region no matter which Shipping Zone the customer falls within.
You need to have at least one custom created Shipping Zone with Shipping Methods attached to it to populate the Shipping Methods list in LPAC’s settings. Shipping methods attached to the zone called “Locations not covered by your other zones” will not show up in the list.
When attaching Shipping Methods to a Shipping Zone. The shipping method you are creating needs to have a cost set. If you do not want to set any base cost for the shipping method, set the Cost field to 0:
Show Shipping Regions on Checkout Map
Check this option to show the drawn shipping regions on the checkout page map.
Ship Only to Drawn Regions
Use this option to only ship to the regions you have drawn on the map. If a customer location does not fall within any of the regions you have drawn then WooCommerce will not allow the order to go through.
No Shipping Method Available Text
This is the text that shows when the customer location does not fall within any of your drawn shipping regions/zones:
No Shipping Method Error
This is the text that displays when a customer tries to place an order without the a shipping method being selected:
Display Shipping Regions Name
Check this option if you want to show the Drawn Shipping Regions name on the checkout page map.
Display Shipping Regions Cost
Check this option if you want to show the Drawn Shipping Regions price on the checkout page map.
Default Region Color (HEX)
Use this option to set the default color to use for shipping regions when no background color is set.
When creating shipping regions, you need to have the background color code copied to your clipboard beforehand. Switching tabs or windows while creating a shipping region will cause the page to refresh.
You can find the HEX code for colors here: HTML Color Codes (be sure to include the # when copying the color code)
Cost by Distance
Distance Matrix API Key
Since this feature requires you not having Application Restrictions set on your API Key (like you should have on the main API Key you set in General Settings) then you should create a separate API key just for this feature. So the only difference when creating this API key would be the lack of referrer restrictions, but you can still set an API restriction to ensure this API key will only be used for the Distance Matrix API. The following video shows how to enable the Distance Matrix API and create a new API Key which is restricted to it’s use:
Enter the latitude and longitude for the Origin (Start) location from which orders/pickups would originate from. This will be used as the “From” location when LPAC calculates the distance to the customer’s location.
Cost per Unit
Enter the cost you’d like to charge per the unit you select.
Select your preferred distance unit, whether Kilometers or Miles.
This option lets you select the travel mode you’d be using for the delivery/pickup. If you select Bicycling then the API will attempt to find bicycling distance via bicycle paths & preferred streets (where available).
If you select Walking then the API will attempt to find walking distance via pedestrian paths & sidewalks (where available).
Note well the “where available” part. If the locations you’d be delivering/picking up doesn’t have Bicycle or Sidewalks then this feature might not work as expected. Driving mode is usually the most reliable option.
Select the Shipping Method(s) you’d like the distance cost to be applied to. If you already have a base cost set on the shipping method then LPAC will add the calculated shipping cost by distance to that base shipping cost you set for the shipping method in WooCommerce’s settings.
Limit Shipping Distance
Use this option to limit the maximum distance you’re willing to ship to.
Set the maximum distance you’re going to ship to. This option will respect the “Distance Unit” that you set for the Cost by Distance feature (whether Kilometers or Miles).
No Shipping Method Available Text
This is the text that shows when the customer location falls beyond your maximum set shipping distance:
No Shipping Method Error
This is the text that displays when a customer tries to place an order and their location is beyond your maximum set shipping distance:
When using the Shipping Cost by Distance feature it’s important to understand that the results might not always be accurate. Google will always return the distance to the nearest road that can be used to access the customer’s location.
This means that if a customer lives on a hill, but there is no publicly access road to that hill, Google will return the distance to closest road to that hill, meaning there might still be some traveling to be done to get to the customer’s actual location. You should consider this limitation when coming up with the distance cost you’d like to charge customers.