Nearship – Distance-Based Shipping & Local Delivery
Charge WooCommerce delivery by the distance from your nearest store, with price bands, delivery areas drawn on a map and store pickup.
Thank you for buying Nearship. This guide walks you from installation to your first priced delivery, and explains every setting. If something isn't covered here, contact us through the support tab on CodeCanyon.
Overview
Nearship adds a shipping method to WooCommerce. When a customer enters an address at checkout, Nearship finds it on the map, picks the store closest to the customer, measures the distance and prices the delivery with your rules.
- Distance bands – a flat price per band, or a price per km/mile; a base fee, a minimum and maximum, and free delivery above an order value.
- Several stores or warehouses – each order is priced from the nearest one, and the order shows which store ships it.
- Delivery areas – draw polygons or circles; outside them the customer sees your own message.
- Store pickup – offer "Pickup at <store>", free or with a fee.
- Shipping-class surcharges – add a fee for bulky or chilled items.
- No API key needed – OpenStreetMap and straight-line distance work out of the box; Google, Mapbox or openrouteservice add driving distance.
- Works with the classic and the block checkout, and with HPOS order storage.
Requirements
| WordPress | 6.5 or newer (tested up to 7.1) |
|---|---|
| WooCommerce | 8.0 or newer (tested up to 11.1) |
| PHP | 7.4 or newer |
| Server | Outgoing HTTPS requests allowed (to look up addresses) |
Installation
- In the package you downloaded from CodeCanyon, open the
Pluginfolder. It containsnearship.zip. - In WordPress go to Plugins → Add New Plugin → Upload Plugin, choose
nearship.zipand click Install Now. - Click Activate. WooCommerce must be installed and active.
nearship.zip, not the whole package you downloaded. The package also contains this documentation and the licences.Quick start (5 minutes)
- Go to WooCommerce → Settings → Shipping and open (or create) the shipping zone you deliver to, for example your country.
- Click Add shipping method, choose Nearship – Distance-based delivery and save.
- Click Edit on the new method, then Open the Nearship editor.
- Under Stores, enter your shop's name and address and click Add store. Its pin appears on the map.
- Under Prices by distance, adjust the bands (for example 0–5 km €2.90, 5–10 km €4.90).
- Type a customer address in Try an address and click Get price to check the result.
- Click Save changes. Customers now see the delivery price at checkout.
You can also reach the editor from WooCommerce → Nearship, which lists every shipping zone that uses Nearship.
The Nearship editor
Each shipping zone has its own editor page, so you can price delivery differently for different regions. The left column holds the settings; the map on the right shows their effect:
- Green pins are your stores. Click a store in the list (or its pin) to select it.
- Dashed rings around the selected store are your price bands, labelled with their price.
- Blue shapes are your delivery areas.
- A dark pin marks the address you tried, with a dotted line to the store that would ship it.
Changes are not live until you click Save changes (or press Ctrl/Cmd + S). The header shows "Unsaved changes" while you edit, and the browser warns you if you leave with unsaved changes.
Stores
- Add a store: enter a name (optional) and the address, then click Add store. Nearship looks the address up and places a pin.
- Move a pin: drag it on the map, for example to your shop's delivery entrance.
- Rename: click the store name in the list and type.
- Remove: click Remove next to the store.
With more than one store, every order is priced from the store closest to the customer, and the checkout label reads, for example, "Local delivery from Haarlem (7.2 km)".
Prices by distance
Each band covers distances above From up to and including To. The first band also includes its starting point, so a band from 0 covers an address right next to the store.
| Setting | What it does |
|---|---|
| Flat | The band's price is charged as is. |
| Per km / per mile | The price is multiplied by the distance, e.g. 14.1 km × €1.20 = €16.92. |
| km / miles | The unit for bands, labels and the checkout. |
| Base fee | Added to every delivery. |
| Minimum / Maximum | The delivery price is kept within these limits. |
| Free from | Delivery is free when the order subtotal reaches this value (inside your bands). |
Beyond the last band, delivery isn't offered. The editor warns you if there is a gap between bands (no delivery there) or an overlap (the first matching band wins). When you change where a band ends, the next band starts there automatically.
Delivery areas
Areas are optional. Without any, you deliver wherever your price bands reach. With areas, you deliver only inside them.
- Draw an area: click the button, click the map to place corners, then click Finish area. Press
Escor Cancel to stop. - Add a circle: set the radius in km, click the button, then click the map where the circle should be centred.
- Remove an area from the list below the map.
Pickup & surcharges
Store pickup
Tick Let customers pick up at a store to offer one "Pickup at <store>" option per store, nearest first. Set a Pickup fee (empty is free) and, if you like, your own Label instead of "Pickup at".
When an address is outside your areas or bands, customers still get the pickup options, and your "we don't deliver here" message appears under the first one.
Surcharge by shipping class
Every shipping class of your store is listed with a fee field. The fee is added once per order for each class in the cart, also when delivery is otherwise free. Create classes under WooCommerce → Settings → Shipping → Classes and assign them to products.
At checkout
- Show the distance next to the price adds, for example, "(6.4 km)" to the label.
- Message when you don't deliver to an address is shown to customers whose address is outside your areas or beyond your last band.
- The method title and tax status are set in the shipping-zone window (WooCommerce → Settings → Shipping → your zone → Edit).
Try an address
Type a customer address and an order value, then click Get price. The result uses the settings currently on the page, including unsaved changes, so you can test a change before customers see it. It tells you the price, the store that would ship and the distance, or why no delivery would be offered.
Map providers & API keys
Go to WooCommerce → Settings → Shipping → Nearship.
| Provider | Address lookups | Distance | Key |
|---|---|---|---|
| None (default) | OpenStreetMap Nominatim | Straight line | Not needed |
| Google Maps Platform | Geocoding API | Routes API (driving) | API key with "Geocoding API" and "Routes API" enabled |
| Mapbox | Geocoding v6 | Directions (driving) | Access token |
| openrouteservice | Geocoding (Pelias) | Directions (driving) | Free key from openrouteservice.org |
Pick a provider, paste its key and click Test connection. It looks up your store address (from WooCommerce → Settings → General) and a short route, and tells you exactly what works. Then click Save changes.
If the provider fails (wrong key, quota, outage), addresses fall back to OpenStreetMap and distances to straight line, so customers still get a price.
Google users: Nearship uses the current Routes API, not the legacy Distance Matrix API, which isn't available to new Google Cloud projects.
OpenStreetMap: the free Nominatim service allows light use (about one request per second). Nearship respects this and caches every result. For busy stores, choose a provider.
What you see on orders
- Delivery orders show Delivery distance (e.g. 7.2 km) and Ships from (the store).
- Pickup orders show Pickup store and Pickup address.
Privacy & third-party services
To price a delivery, Nearship sends the customer's delivery address (street, postcode, city, country) to the address lookup service you chose, and, with driving distance on, the store and customer coordinates to the routing service. Mention this in your privacy policy.
- OpenStreetMap Nominatim – usage policy, privacy
- Google Maps Platform – terms, privacy
- Mapbox – terms, privacy
- openrouteservice – terms, privacy
- The admin map shows OpenStreetMap tiles – tile usage policy
For developers
| Hook | Type | Use |
|---|---|---|
nrsp_geocoder | filter | Replace the address lookup with your own object implementing Nearship\Geocode\Geocoder. |
Settings are stored per shipping-method instance in the option nrsp_zone_{instance_id}. Order shipping lines carry nrsp_distance, nrsp_origin (or nrsp_pickup / nrsp_pickup_address) and hidden _nrsp_distance_value, _nrsp_unit, _nrsp_distance_mode.
FAQ & troubleshooting
Nearship doesn't appear at checkout
- Check the customer's country is in the shipping zone that has Nearship.
- Check at least one store has a pin, and the address is within your last band and inside your areas (if any).
- Use Try an address in the editor with the same address: it tells you why.
"That address could not be found"
Add the postcode and city, and check the spelling. If it keeps happening, choose a map provider; they find more addresses than the free OpenStreetMap service.
The price looks wrong
Straight-line distance is shorter than driving distance. Set driving distance with a provider, or widen your bands.
I changed prices but checkout shows the old ones
Nearship refreshes WooCommerce's shipping cache when you save. If a customer's cart was open, a page reload shows the new price.
Uninstalling
Deactivating keeps your settings. Deleting the plugin from Plugins removes every Nearship setting, API key and cached lookup from the database. Past orders keep their shipping details.
Support
Use the Support tab on the CodeCanyon item page. Include your WordPress, WooCommerce and PHP versions, and an example address that doesn't behave as expected.
Changelog
1.0.0
- First release.