Delivery Zone and Fees
On this page
Delivery Fee charges a delivery fee that depends on where the customer is, and refuses delivery to addresses you do not serve. It supports two methods: fees by ZIP/postal code, and fees by driving distance from your store (using Google Maps). Each rule can also set its own free-delivery threshold and its own minimum order amount.
RestroPress 3.4 includes a free Flat delivery fee in RestroPress › Settings › General › Delivery Fee, charged on every delivery order. When this extension is active it replaces that section completely, and the flat fee is not charged. The extension adds:
- Fees by ZIP/postal code, including wildcard ranges such as
606*. - Fees by distance ranges from your store, in kilometres or miles.
- Delivery only to the zones or distances you define, with a custom "we do not deliver here" message.
- Free delivery above a cart amount, globally and per rule.
- A minimum order amount per rule.
- Separate distance rules for each branch when the Multilocation extension is active.
- Email tags, the ZIP shown on the order, and the option to hide checkout address fields.
If you currently use the flat fee, enter that amount as a rule in the extension before activating it, otherwise delivery will be refused or free.
Requirements#
- RestroPress. The extension shows an error notice when RestroPress is missing, and uses the RestroPress 3.4 checkout service fee filters.
- WordPress 4.0 or higher and PHP 5.4 or higher, as stated in the readme.
- For the Location Based method: a Google Maps API key with the Maps JavaScript, Places and Distance Matrix services enabled. The code calls the Distance Matrix endpoint for driving distance and loads the Maps script with the
placesandgeometrylibraries. - Optional: the Multilocation extension for branch-specific fees.
The RestroPress Address Auto Complete plugin cannot be activated while Delivery Fee is active; its Activate link is replaced with a warning.
Installation#
- Go to Plugins › Add New › Upload Plugin, choose the ZIP and click Install Now.
- Click Activate.
- Open RestroPress › Settings › General › Delivery Fee. A Settings link is also added to the plugin row.
The plugin contains no licence field or update checker, so there is no licence key to enter.
Settings#
Everything is in RestroPress › Settings › General › Delivery Fee, under the heading Delivery Fee Settings.

| Setting | What it does | Default |
|---|---|---|
| Zip/Postal code input field label | Label of the ZIP field in the delivery popup. With the Location Based method it is used as the address label. | Empty (address label falls back to "Delivery Address") |
| ZIP/Postal code input placeholder | Placeholder text of that field. | "Enter your zip/postal code", or "Enter your delivery address" for Location Based |
| Error message for unavailable zip/postal code/distance | Shown when the ZIP does not match a rule, or the distance is outside every range. | "Sorry we don't deliver here" |
| Hide checkout fields | Multi-select of checkout form fields to hide. Hidden fields are also removed from the required fields. | None |
| Select delivery fee method | Radio: Zip Based or Location Based. | Zip Based |
| Google Map API Key | Used for Location Based fees. If the Multilocation extension has its own key, that key is used. If both are empty, the RestroPress Google Maps key (google_map_api_key) is used. | Empty |
| Store Location | Address field with a Set Location button and a draggable map marker. The coordinates are saved in a hidden-style text field. Distances are measured from this point. | A placeholder in Bhubaneswar, India, until you set your own |
| Distance unit | KM or Miles. | KM |
| Fee table (Location Based) | Rows with Delivery Fee, Distance, Free Delivery Fee, Min Order Amount. | No rows |
| Fee table (Zip Based) | Rows with Delivery Fee, ZIP/Postal Codes, Free Delivery Amount, Min Order Amount. | No rows |
| Branch Specific Delivery Fee (Location Based) | Shown only with Multilocation active. A separate distance table per branch. The settings text says global location-based rows are used when a branch has none, but with Multilocation active the global table is hidden in the admin. | No rows |
| Free Delivery Amount | Number. Carts above this subtotal get free delivery. | Empty |
Fee table columns#
- Delivery Fee: the amount charged for the rule.
- ZIP/Postal Codes (Zip Based): codes separated by commas. Matching ignores case and spaces, and a trailing
*matches any code starting with the characters before it, for example606*. - Distance (Location Based): a range such as
5-20, in the unit chosen above. Both ends are included. - Free Delivery Amount (shown as Free Delivery Fee in the distance table): the cart amount at which this rule's fee becomes 0. When blank, the global Free Delivery Amount is used.
- Min Order Amount: the smallest cart total allowed for this rule. Below it, checkout is blocked with the message "Minimum order amount for this address is {minimum_order_amount}". This message has no settings field in this version.
When more than one row matches, the last matching row wins.
How it works#
- In the delivery popup the customer enters a ZIP/postal code (Zip Based) or picks an address from the Google suggestions (Location Based). The extension checks it by AJAX (
check_delivery_fee) and stores the result in cookies (delivery_zip,delivery_latlng,delivery_location). - If the code or distance matches a rule, a cart fee named "Delivery Fee" (id
delivery_fee) is added. If not, the customer sees the unavailable message and delivery is blocked; for Zip Based the message "Please enter your zip/postal code" shows when the field is empty, and for Location Based "Please choose a valid address from the location list." shows when no valid address was picked. - The fee becomes 0 when the cart subtotal reaches the rule's free-delivery amount or the global one.
- Switching to pickup, or any non-delivery service, removes the delivery fee from the cart, from the gateway purchase data and from the saved order.
- At checkout the location is validated again. On Location Based, an Address field is added to the checkout form for delivery orders.
- The core checkout service chip shows the computed zone or distance fee for the Delivery option.
In the admin and emails#
- The order's ZIP is saved in
_rpress_delivery_zipand shown in the order details as "Delivery zip/postal code". - Two email tags are added:
{delivery_fee}(the delivery fee of the order) and{delivery_zone}(the customer's ZIP). - For Location Based orders the receipt address shows the chosen address and a "Get Direction" link to Google Maps.
- The mobile app endpoint
/user-api/v1/homegets an extradelivery_fee_methodvalue.
Developer reference#
| Hook | Type | Parameters | Purpose |
|---|---|---|---|
rpress_get_delivery_fee_setting | filter | $delivery_fee_settings | Change the saved settings (option rp_delivery_fee). |
rp_shared_google_map_api_key | filter | $key, $delivery_settings, $multi_location_settings | Override the Google Maps key. |
rp_delivery_fee_branch_position | filter | $store_position | Change the store origin (lat,lng) used for distance. |
rp_postdata_store_position | filter | $position, $postdata | Supply the store origin for a service check. |
rp_delivery_fee_multi_branch_before | filter | $response, $postdata | Pre-fill the zone check response. |
rp_delivery_fee_multi_branch_after | filter | $response, $postdata | Adjust the zone check response. |
rp_delivery_location_placeholder | filter | $placeholder | Placeholder of the address field. |
zip_code_text | filter | $placeholder | Placeholder of the ZIP field. |
AJAX action: check_delivery_fee (logged in and logged out). Example, a lower free-delivery threshold on weekends:
add_filter( 'rpress_get_delivery_fee_setting', function ( $settings ) {
if ( in_array( wp_date( 'N' ), array( '6', '7' ), true ) ) {
$settings['free_delivery_amount'] = 25;
}
return $settings;
} );
Troubleshooting#
- "Sorry we don't deliver here" for every address. No rule matches, the Distance Matrix request failed, or no API key is set. Check the key has the services enabled and billing active.
- Distances look wrong. The Store Location still holds the placeholder. Set your own address and save.
- The free-delivery threshold seems off by one. Some code paths use "above" and others "at or above" the amount.
- No fee appears for pickup. This is intended; the fee is removed for non-delivery services.
- Customers see the flat fee disappear after activation. The core flat fee is replaced by this extension.
- Cannot activate Address Auto Complete. It conflicts with this extension.
Changelog highlights#
- 3.1.6 (20-10-2026): delivery fees are fully removed when the customer switches to pickup, in the frontend, AJAX and checkout validation; the "Free" sublabel is suppressed when fee rules exist.
- 3.1.5 (25-09-2026): better Google Places address parsing, Multilocation compatibility, and a fallback to the core Google Maps key.
- 3.1.4 (07-07-2026): fee updates immediately when switching between delivery and pickup, and the checkout service chip shows the zone or distance fee.
