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.

Requirements

WordPress6.5 or newer (tested up to 7.1)
WooCommerce8.0 or newer (tested up to 11.1)
PHP7.4 or newer
ServerOutgoing HTTPS requests allowed (to look up addresses)

Installation

  1. In the package you downloaded from CodeCanyon, open the Plugin folder. It contains nearship.zip.
  2. In WordPress go to Plugins → Add New Plugin → Upload Plugin, choose nearship.zip and click Install Now.
  3. Click Activate. WooCommerce must be installed and active.
Upload nearship.zip, not the whole package you downloaded. The package also contains this documentation and the licences.

Quick start (5 minutes)

  1. Go to WooCommerce → Settings → Shipping and open (or create) the shipping zone you deliver to, for example your country.
  2. Click Add shipping method, choose Nearship – Distance-based delivery and save.
  3. Click Edit on the new method, then Open the Nearship editor.
  4. Under Stores, enter your shop's name and address and click Add store. Its pin appears on the map.
  5. Under Prices by distance, adjust the bands (for example 0–5 km €2.90, 5–10 km €4.90).
  6. Type a customer address in Try an address and click Get price to check the result.
  7. 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:

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

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)".

With a map provider and driving distance on, Nearship shortlists the three stores closest in a straight line and asks the provider for driving distance only for those, so provider usage doesn't grow with the number of stores.

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.

SettingWhat it does
FlatThe band's price is charged as is.
Per km / per mileThe price is multiplied by the distance, e.g. 14.1 km × €1.20 = €16.92.
km / milesThe unit for bands, labels and the checkout.
Base feeAdded to every delivery.
Minimum / MaximumThe delivery price is kept within these limits.
Free fromDelivery 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.

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

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.

ProviderAddress lookupsDistanceKey
None (default)OpenStreetMap NominatimStraight lineNot needed
Google Maps PlatformGeocoding APIRoutes API (driving)API key with "Geocoding API" and "Routes API" enabled
MapboxGeocoding v6Directions (driving)Access token
openrouteserviceGeocoding (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.

Costs. Google, Mapbox and openrouteservice may charge for usage under their own pricing and free tiers; you pay them directly. Nearship keeps each address for 30 days and each route for 30 days, so the same customer is not looked up twice.

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

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.

For developers

HookTypeUse
nrsp_geocoderfilterReplace 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

"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