1. Home
  2. Docs
  3. Getting Started
  4. Plugin Settings
  5. Shipping

Shipping

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.

Shipping Methods

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.

NOTE

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:

Image of no shipping methods available for region.
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.

NOTE

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:

Shipping Methods

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.

Origin Coordinates

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.

Distance Unit

Select your preferred distance unit, whether Kilometers or Miles.

Travel Mode

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.

Limit Shipping Distance

Use this option to limit the maximum distance you’re willing to ship to.

Maximum Distance

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:

Note

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.


Cost by Distance Range

This feature lets you create distance ranges and set the price to use when a user falls within (or beyond) your created ranges.

When creating your entries, the Start Range on the next row should be the End Range of the previous row:

This will ensure ranges aren’t skipped while LPAC is running its logic.

If the last row in your list does not have an End Range value set, like this example:

Then LPAC will use $25.00 as the shipping price for any customer who’s distance is 20 kilometers or more away from your “Origin Coordinates” which you set in the base Cost by Distance setting:

If the last row in your list does have an End Range value set, like this example:

Then LPAC will use $25.00 as the shipping price for all customers that are up to 33 kilometers away. If a customer is beyond that, then they would not be able to complete the checkout as no shipping methods would be available for them.

Cost by Store Distance

The Cost by Store Distance feature in LPAC lets you create entries from your saved store locations, and set the price per unit distance for shipping from that location.

This feature is reliant on the Cost by Distance feature since it makes use of the store’s distance relative to the customer’s location and then multiplies that distance value by the price that you set for that particular store. The final price is then set as the shipping price for the order.

Note

You need to have store locations created to populate the “Select store” dropdown. Please see here.


Cost by Store Location

The Cost by Store feature in LPAC lets you create entries from your saved store locations and set the flat rate for shipping from that store location to the customer. This setting doesn’t rely on any customer location information, it simply sets the shipping price based on the store the customer selects on the checkout page.

Note

You need to have store locations created to populate the “Select store” dropdown. Please see here.

Shipping Methods

Set the shipping(s) method that this feature applies to. The feature will not work unless you select a shipping method that the cost should apply to.

If you added a flat rate cost to the shipping method when you created it, then that cost will also be added to the shipping cost at checkout.

Was this article helpful to you? Yes No