Plugin: mam-woocommerce-delivery

What it does

mam-woocommerce-delivery turns the mobile app into a working surface for delivery drivers of a WooCommerce store. It adds:

  • A driver user role and an on/off-duty (punch in/out) flow. A user with the driver role gets a dedicated home screen in the app. When the driver has no active trip, the home screen shows a Go on Duty / Go off Duty button; punching in marks the driver as available so vendors see “(Available)” next to their name when assigning orders.
  • An available-orders board with an atomic claim flow. Orders that are waiting for a driver appear in the WC Delivery Available Orders list. Until a driver claims an order, browsing drivers see a non-PII summary (order number, date, item count, pickup location title) — customer name, address, phone, email, and GPS coordinates are only shown to the order’s vendor staff or a store manager. Claiming is atomic: a per-order lock guarantees that when two drivers tap “claim” at the same moment, exactly one wins and the other is rejected.
  • A transport-status ladder that routes every order from acceptance to completion, with a separate ladder for delivery and pickup orders (see below). Each tap of the status button on an order advances it one rung.
  • Customer notifications per status. Every stage that matters to the customer fires a notification through MAM’s notification manager (mam_notification_send_message) — driver assigned, order en route, delivered, ready for pickup, picked up. The notification texts are configured in the MAM notifications screen against this plugin’s slugs.
  • Delivery-area / zip-code validation. The app’s checkout can ask “do you deliver here?” The answer comes from a polygon drawn on a map, a zip-code allow-list, or the vendor’s Product Vendors service radius — selectable per site.
  • Pickup/delivery selectors at web checkout. Location, date, and time dropdowns on the WooCommerce checkout page, fed by per-location weekly time slots.
  • DoorDash hand-off. Instead of assigning an in-house driver, a vendor can dispatch the order to DoorDash; the mam-doordash-delivery plugin picks up the request and pushes status updates back into the same transport ladder.
  • Cron-driven reminders. Two scheduled tasks notify administrators when no driver has accepted an order, and notify the vendor when an order is due to start soon.

The plugin is HPOS-compatible: it declares WooCommerce custom_order_tables compatibility and performs all order reads/writes through the WooCommerce CRUD and wc_get_orders() APIs, so it works identically on legacy post storage and High-Performance Order Storage.


The transport-status ladders

Each order carries a transport_status order meta. The ladder it walks depends on the order’s location_type meta (delivery or pickup). Tapping the action button at a stage fires that stage’s customer notification and advances the order to the next stage; completing the final stage marks the WooCommerce order Completed.

Delivery routing:

Button title transport_status App order category Customer notification slug
Accept Order accepted_order New Order
Starting Order prep_started Preparing
Assign to Driver driver_assigned Request Driver mam_wc_delivery_driver_assigned_to_order
Driver Picked Up order_en_route Driver Picked Up wc-delivery-order-enroute
Order Delivered order_completed Completed wc-delivery-order-delivered-customer

Pickup routing:

Button title transport_status App order category Customer notification slug
Accept Order accepted_order New Order
Starting Order prep_started Preparing
Order Ready customer_notified Notify Customer wc-delivery-order-ready-pickup-customer
Customer Picked Up order_completed Completed wc-delivery-order-completed-customer

Advancement happens through the mam_check_in app action (or mam_wc_pv_complete_order_check_in from the Product Vendors order screens). Third-party services advance orders server-side via the mam_wc_delivery_set_delivery_status action. Authorization is enforced at every advance: only the assigned driver, the order’s vendor staff, or a store manager may move an order (see Hooks: transport authorization).


Where it appears in the app

Surface Driver
Driver home screen (duty button, active-trip card, order list) mam_get_phone_data_before_send filter builds a homescreen_stack for users with the driver role
Open orders list (the driver’s own assigned orders) mam_wc_delivery_open_orders content class (WC Delivery Open Orders, list)
Available orders board (unclaimed orders, non-PII) mam_wc_delivery_available_orders content class (WC Delivery Available Orders, offDirectory)
Delivery-area location map / add-location form mam_wc_delivery_delivery_locations content class (WC Delivery Location Map, list)

Settings

All settings live on Mobile App Manager → WooCommerce Settings → Delivery tab:

Setting Option key Default What it does
Base delivery fee tsl-setting-base_deliver_fee 0 Flat component of the shipping estimate
Delivery fee per mile tsl-setting-deliver_fee_per_mile 0 Per-mile component of the shipping estimate
Tip % for Driver (Balance to Seller) tsl-setting-deliver_driver_tip_percent unset (no split) Splits the order tip between driver and seller
Order Assignment Minute(s) tsl-setting-deliver_driver_assignment_minutes 5 How long an order may wait for a driver before admins are notified; also the cron frequency
Order Due to Start Notification Time tsl-setting-deliver_driver_start_order_notification_minutes 5 Lead time for the “order due to start” vendor notification; also the cron frequency
On Duty Image tsl-setting-deliver_driver_on_duty_image unset Image shown on the driver home screen with the duty button
Off Duty Image tsl-setting-deliver_driver_off_duty_image unset Companion image setting for the off-duty state
Shipping Distance Assumption (miles) tsl-setting-deliver_shipping_distance_miles 10 Flat distance used by the app’s shipping-cost estimate
Store Location Parent Post ID tsl-setting-deliver_store_post_parent 137 (fail-safe 0) Parent post for store locations added from the app’s map form
Large Image Resizer URL Prefix tsl-setting-deliver_image_sizer_url the TSL image-sizer URL URL prefix used to downscale location images larger than 800px

The web checkout selectors are additionally gated by the mam_show_wc_delivery_on_web option (no admin UI in this plugin; set via option or a sibling plugin).


Setup paths

  1. Install and activate mam-main (1.9.1+) and WooCommerce; the plugin returns early without either. The entitlement filter mam_plugin_entitlement must return a non-blocked record for mam-woocommerce-delivery.
  2. (Recommended) Activate WooCommerce Product Vendors and mam-woocommerce-product-vendors — vendor ownership, the vendor order screens, and driver assignment selectors all use the Product Vendors data.
  3. Create driver accounts and give them the driver role (registered automatically). The role is also added to mam_wc_pv_staff_roles so vendors can manage drivers.
  4. Configure the Delivery settings tab and the notification texts (Mobile App Manager → Notifications; all slugs are pre-registered).
  5. Add the WC Delivery Available Orders and WC Delivery Open Orders content to the app where drivers should see them; drivers automatically get the driver home screen.
  6. (Optional) Configure delivery areas — see Recipe: Configure delivery areas.
  7. (Optional) Activate mam-doordash-delivery for the DoorDash hand-off.

Key concepts to know

  • driver role — a subscriber-capability role registered on init; the app keys the entire driver experience off it.
  • transport_status order meta — the single source of truth for where an order is in its ladder; transport_status_<stage> metas record the timestamp of each advance.
  • pv-location CPT (Store Location) — per-vendor locations with address, geocoded lat/lon, truck/driver slots, and weekly delivery time slots; feeds the checkout date/time selectors.
  • Punch statetsl_activity_user_is_punched_in user meta (1 = on duty, 2 = off duty) plus tsl_activity_user_active_date (site-local date); toggled by the duty button.
  • Atomic claim — claiming writes assigned_to_driver under a per-order lock so double-claims are impossible.

  • Recipe: Set up delivery drivers
  • Recipe: Configure delivery areas
  • Recipe: Transport statuses and customer notifications
  • Recipe: Pickup and delivery options at checkout
  • Hooks: transport authorization (mam_wc_delivery_user_can_manage_transport)
  • Hooks: mam_check_in and order advancement
  • Hooks: delivery-area checks (wc_delivery_in_delivery_area_type)
  • Hooks: driver dispatch and cron (mam_wc_delivery_request_driver)
  • Hook: mam_ride_share_driver_update
  • Hooks: white-label overrides (mam_wc_delivery_store_post_parent)

Metadata

Field Value
Article type Plugin Overview
Plugin slug mam-woocommerce-delivery
Applies to plugin version 1.4.1+
Category Plugin Reference
Depends on MAM Main (1.9.1+), WooCommerce
Works with WooCommerce Product Vendors, MAM WooCommerce Product Vendors (via hooks), MAM DoorDash Delivery, MAM WooCommerce Ride Share (interop), MAM WooCommerce
Hooks exposed mam_wc_delivery_user_can_manage_transport, mam_wc_delivery_user_can_claim_order, mam_check_in, mam_wc_pv_complete_order_check_in, wc_delivery_in_delivery_area_type, mam_wc_delivery_area_zip_codes, mam_wc_delivery_request_driver, mam_wc_delivery_start_order, mam_wc_delivery_no_driver_accepted, mam_ride_share_driver_update, mam_wc_delivery_store_post_parent, mam_wc_delivery_image_sizer_url, and more
Last verified 2026-06-10
Contents

    Need Support?

    Can't find the answer you're looking for? Don't worry we're here to help!