Recipe: Driver home screen and duty toggle

What the driver sees

A user with a driver or manager vendor role gets one of two home screens:

No active trip — the duty toggle. A check_in_location element with a Go on Duty / Go off Duty button plus a configurable image for each state. Tapping the button (it requires location permission) toggles the driver’s punch-in state. Duty status is per WP-timezone day: going on duty stamps today’s date, and the on-duty checks compare against the current date — so drivers effectively go off duty automatically at midnight and must punch in each day. Only on-duty drivers are matched to bookings or listed as available.

Active trip — the status-advance button. When a processing order carries the driver’s driver_id, the toggle is replaced by the ride card: a single button whose title is always the next step of the state machine (Enroute to Pickup → Arrived at Pickup → Departed Pickup → Arrived at Destination → Trip Completed), plus the trip details (customer name, pickup/drop-off, pickup time, customer phone, directions, and — with MAM Chat Manager active — a chat button). Each tap advances the ride one state, records a GPS checkpoint, and notifies the rider. The final tap completes the WooCommerce order and frees the driver for the next trip.

Both buttons post the mam_ride_share_driver_update subaction — see the hook article for the wire contract.


Settings

All on Mobile App Manager → WooCommerce Settings → Ride Share. Each falls back to its previous hardcoded value when left empty, so existing sites are unaffected until you change them.

Setting Option id Default What it does
Driver On Duty Image (attachment ID) tsl-setting-ride_share_on_duty_image_id 72 Media-library attachment shown under the duty toggle while on duty
Driver Off Duty Image (attachment ID) tsl-setting-ride_share_off_duty_image_id 73 Attachment shown while off duty
Button Background Red / Green / Blue (0-1) mam_wc_ride_share_button_background_red / _green / _blue 1 / 1 / 1 RGB components (0–1) for every ride-share button on the home screen
Account Button Title tsl-setting-ride_share_account_button_title My Account The tab the rider’s “Update Your Payment Method” button opens — must match your app’s account tab-bar button title
Rider Chat Thread ID tsl-setting-ride_share_chat_thread_id 999 Chat thread the driver↔rider conversation uses (MAM Chat Manager)

To use your own duty images, upload them to the Media Library and enter their attachment IDs (visible in the media item’s URL, post=<ID>). If an ID points at a missing attachment the image block is simply skipped — the screen never errors.


Troubleshooting

  • Driver never appears available: check they punched in today (duty resets daily), that their account has a parent_pv_account_id linking them to a vendor, and that the app has reported a location for them.
  • Duty button does nothing: location permission is required (no_gps message shows otherwise), and the user must resolve to a logged-in app user.
  • No image under the toggle: the attachment ID doesn’t exist on this site — set the two image settings.


Metadata

Field Value
Article type Recipe
Plugin slug mam-woocommerce-ride-share
Applies to plugin version 1.3.1+
Category Building Your App
Audience App builder
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!