RideCab Documentation
Premium Taxi & Cab Booking Plugin for WordPress + WooCommerce — built by Canopus Web Agency.WP_DEBUG.3-step form with vehicle selection and WC checkout
Per km, per hour, tiered distance, tiered hourly
Polygon-based fixed fares and surcharges per zone
FullCalendar with color-coded driver assignment
1. System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| PHP | 7.4 | 8.2 |
| WordPress | 5.8 | 6.5+ |
| WooCommerce | 7.0 | 8.0+ (HPOS) |
| MySQL / MariaDB | 5.6 / 10.0 | 8.0 / 10.6 |
| Google Maps API | Required | Required for autocomplete, maps & geofences |
get_post_meta() on WC orders — always use $order->get_meta().2. Installation
- Upload the plugin Go to WordPress Admin → Plugins → Add New → Upload Plugin. Select the
ridecab.zipfile and click Install Now. - Activate Click Activate Plugin. RideCab will automatically create all required database tables.
- Confirm WooCommerce is active RideCab requires WooCommerce 7.0+. If WooCommerce is not active, an admin notice will appear and the plugin will not load.
- Configure Settings Navigate to RideCab → Settings and complete at minimum the General and Maps tabs.
- Add a vehicle Go to RideCab → Vehicles → Add New. Set a name, pricing type, and rates.
- Embed the booking form Add the shortcode
[ridecab_booking_form]to any page or post.
3. General Settings
Found at RideCab → Settings → General.
| Option | Description |
|---|---|
| Booking Number Prefix | Prepended to every booking number. Default: RC- → produces RC-0001. |
| Booking Number Length | Minimum digit count (zero-padded). Default: 4. |
| Minimum Booking Advance | Hours before pickup that customers cannot book within. 0 = no minimum. |
| Maximum Booking Advance | Days ahead customers can book. 0 = no limit. |
| Enable Driver Management | Shows the Drivers submenu. Disabled by default — enable only if you assign drivers. |
4. Maps & Location Settings
Found at RideCab → Settings → Maps.
Google Maps Setup
You need two separate API keys from Google Cloud Console:
Client API Key (browser-side)
Enable these APIs in Google Cloud Console:
- Maps JavaScript API — renders the interactive map
- Places API — address autocomplete on pickup / drop-off inputs
- Geocoding API — converts a typed address to coordinates
- Directions API — draws the route on the map after booking
Server API Key (backend-only)
Enable these APIs:
- Distance Matrix API — calculates road distance and travel time for fare calculation
- Geocoding API — server-side address-to-coordinates conversion
Other Settings
| Option | Description |
|---|---|
| Distance Unit | Kilometres or Miles. Affects fare rates and all distance displays. |
| Default Zoom | 1 = world view · 15 = streets · 20 = building level. Default: 12. |
5. Appearance Settings
Found at RideCab → Settings → Appearance.
| Option | Description |
|---|---|
| Primary Colour | Main accent colour for buttons, active step indicator, and highlights. |
| Secondary Colour | Contrast colour for button text and card backgrounds. |
| Custom Error Messages | Override the default validation messages shown in the booking form. |
6. Email Settings
Found at RideCab → Settings → Emails. Configure the company information that appears at the top of every booking email, and learn how the two custom emails work.
Company Information Fields
| Field | Description |
|---|---|
| Company Logo | Upload via the WordPress media library. The logo is displayed at the top of HTML emails (max 160 × 60 px). It does not appear in plain-text emails. |
| Company Name | Business name shown in bold below the logo. |
| Address | Street address or full address block. Line breaks are preserved in HTML emails. |
| Phone | Clickable tel: link in HTML emails. Spaces are stripped from the href automatically. |
| Contact Email | Clickable mailto: link in HTML emails. |
Booking Emails
RideCab sends two custom emails for every confirmed booking:
| Recipient | Trigger | |
|---|---|---|
| Customer Booking Confirmation | Customer (billing email) | Order moves to Processing or On Hold |
| Admin New Booking Notification | Store admin email(s) | Same — sent alongside the customer email |
The admin email also includes a direct View Order link to the WooCommerce order edit screen.
WooCommerce's own default order emails (New Order, Processing Order, On Hold) are automatically suppressed for RideCab orders so customers and admins receive only one set of emails per booking.
What Appears in Each Email
- Company logo, name, address, phone, and contact email — at the top of every email
- Booking reference number
- Pickup address, any intermediate stops, and destination
- Pickup date & time
- Vehicle name (if selected)
- Passenger count and luggage count
- Estimated distance and duration (if available)
- Total price and payment method
- Customer notes (if entered)
Template Overrides
Email templates follow the standard WooCommerce override path. Copy the files to your theme to customise them without losing changes on plugin update:
| Template | Override path in your theme |
|---|---|
| Customer HTML email | your-theme/woocommerce/emails/ridecab-customer-booking.php |
| Admin HTML email | your-theme/woocommerce/emails/ridecab-admin-booking.php |
| Customer plain-text email | your-theme/woocommerce/emails/plain/ridecab-customer-booking.php |
| Admin plain-text email | your-theme/woocommerce/emails/plain/ridecab-admin-booking.php |
Translation
All strings inside the email templates use __( '...', 'ridecab' ) and are fully translatable. RideCab bundles .mo files for Arabic, German, Spanish, and French. When a customer's WordPress locale is set, WooCommerce switches to that locale before sending the customer email, then restores the site locale — so the customer receives the email in their own language automatically.
7. Vehicles
Found at RideCab → Vehicles → Add New.
Each vehicle type has its own pricing model, limits, and display options. Common fields:
| Field | Description |
|---|---|
| Pricing Type | Per km, Per Hour, Tiered Distance, Tiered Hourly — see next section. |
| Base Fare | Fixed charge applied before any distance/time billing starts. |
| Minimum Fare | Floor price. If the calculated fare is lower, this value is used. 0 = no floor. |
| Price Multiplier | Scales the entire strategy subtotal. 1.00 = no change · 1.50 = 50% premium. |
| Min / Max Distance | Hard limits. Bookings outside these bounds return an error. |
| Per Additional Passenger | Extra charge per passenger beyond the first. 0 = free. |
| Per Suitcase | Extra charge per piece of luggage. 0 = included. |
8. Pricing Types
Per km / Per mi
Formula: base_fare + (distance × rate_per_km) + (duration_min × rate_per_minute)
The Rate per Minute field is optional (0 = disabled). Use it for time-based surcharges on top of the distance rate.
Per Hour
Formula: base_fare + (driving_minutes / 60 × per_hour_rate)
Uses the Google Maps driving time. The vehicle multiplier is applied on top.
Tiered Distance
Each km band has its own per-km rate. The last band's rate applies to any distance beyond its upper bound.
Example: 0–10 km = €3/km · 10–50 km = €2/km · 50+ km = €1.50/km.
Tiered Hourly
Each hour band has its own per-hour rate. The customer selects booked hours via a counter on the booking form. The last band applies to any duration beyond its upper bound.
Example: 1–3 h = €40/h · 3–8 h = €35/h · 8+ h = €30/h.
booked_hours to the server.9. Surge Pricing (Surcharges)
Found at RideCab → Surge Pricing → Add New.
Surcharges are applied on top of the vehicle strategy subtotal. Three trigger types:
| Type | Description |
|---|---|
| Time-based | Applies during specific hours of the day (e.g. 22:00–06:00 = night rate). |
| Date-based | Applies on a specific calendar date (e.g. public holiday). |
| Day-of-week | Applies on a specific weekday (e.g. every Saturday). |
Each rule can be a flat amount (€15) or a percentage multiplier (1.25 = +25%).
Rules have a Priority field — higher numbers are evaluated first. Multiple rules can match and stack.
Use the Vehicle Application checkboxes to limit which vehicle types a surcharge applies to.
10. Geofence Rules
Found at RideCab → Geofence Rules → Add New.
Geofence rules override or augment the fare based on the physical location of the pickup and/or dropoff point. Each rule has two zones: Location 1 (pickup) and Location 2 (dropoff).
Zone Types
| Type | Description |
|---|---|
| Precise location | Draw a polygon on the map. The pickup/dropoff must fall inside the polygon for the rule to apply. |
| Anywhere | The rule applies regardless of the location on that side. Useful for "from airport to anywhere" rules. |
Price Types
| Type | Description |
|---|---|
| Fixed fare | Replaces the distance-based fare entirely. The highest-priority matching fixed rule wins. |
| Flat surcharge | Adds a fixed amount on top of the calculated fare. |
| Percentage surcharge | Adds a percentage of the calculated fare on top. |
Direction
| Option | Description |
|---|---|
| Origine ⟺ Destination (Aller/Retour) | The rule applies in both directions: pickup in Location 1 & dropoff in Location 2, or pickup in Location 2 & dropoff in Location 1. |
| Origine → Destination (Aller uniquement) | The rule only applies when the pickup is inside Location 1 and the dropoff is inside Location 2. The reverse trip is not affected. |
How to Create an Airport → Station Fixed Fare
- Set Location 1 type to "Precise location" and draw a polygon around the airport terminal area. Make it generous.
- Set Location 2 type to "Precise location" and draw a polygon around the train station area.
- Set Price type to "Fixed fare" and enter the amount (e.g. €100).
- Check the vehicles the rule should apply to in Vehicle Application.
- Set Status to Active and click Publish.
How the Calculator Uses Geofence Rules
After computing the regular fare, the calculator loops over all active geofence rules ordered by priority (highest first). For each rule it:
- Checks if the vehicle matches the rule's Vehicle Application list.
- Checks the Direction: for Aller/Retour rules, tests both forward (pickup in Location 1, dropoff in Location 2) and reverse. For Aller uniquement, only the forward direction is tested.
- Runs a ray-casting point-in-polygon test for each side against the stored polygon coordinates.
- If the vehicle and direction checks pass → applies the price rule. The first matching fixed-fare rule wins; surcharge rules all stack.
11. Booking Form
The booking form is a 3-step flow embedded via the [ridecab_booking_form] shortcode.
| Step | Content |
|---|---|
| Step 1 | Pickup & drop-off address · date · time · passengers & luggage · return trip toggle |
| Step 2 | Vehicle selection with server-calculated prices · route map · booked hours counter (tiered hourly) |
| Step 3 | Booking summary → redirect to WooCommerce checkout for payment |
Time Picker (12h / 24h)
The time picker automatically detects your WordPress time format (Settings → General → Time Format).
- If the format contains
gorh(PHP 12-hour chars), the 12h picker is shown with an AM/PM selector embedded inside the hour field. - Otherwise the 24h picker is shown (
00h–23h). - Past hours are automatically hidden when today's date is selected. If the entire AM or PM period is in the past, the picker shows all hours as a fallback instead of an empty dropdown.
Instant Booking Tab
When enabled on a booking form (Forms → Edit → Enable Instant Booking), a second tab appears with a simplified time-slot picker for quick same-day bookings.
12. Booking Management
Found at RideCab → Bookings. Each booking row links to a detail page with two postboxes:
- Customer Information — name, email, phone, ride date & time.
- Trip Details — route, vehicle, distance, duration, fare breakdown, driver assignment, admin notes.
Booking Statuses
| Status | Meaning |
|---|---|
| pending | New booking, awaiting confirmation |
| confirmed | Confirmed by admin or auto-confirmed |
| driver_assigned | Driver has been assigned |
| in_progress | Trip has started |
| completed | Trip finished successfully |
| cancelled | Cancelled by customer or admin |
| no_show | Customer did not appear |
| refunded | Payment refunded via WooCommerce |
ridecab_bookings table column status is always read first. The WC order meta _ridecab_booking_status is used as a fallback. Do not edit WC order statuses directly to change a booking status — use the RideCab booking detail page.13. Calendar
Found at RideCab → Calendar. Powered by FullCalendar.
- Shows all bookings in monthly / weekly / daily views.
- Each booking event is coloured by assigned driver — the colour is set on the driver's profile (Calendar Colour field).
- Click any event to open the booking detail page.
calendar_color column is automatically added to the ridecab_drivers table on first calendar load (guarded by a transient so it only runs the ALTER TABLE once per day).14. Invoices
Found at RideCab → Invoices.
Generate a printable PDF invoice for any booking. Click Generate on a booking row — a new tab opens with a formatted invoice that auto-triggers the browser's Print dialog. Use Save as PDF from the print dialog.
Invoice Settings
Found at RideCab → Invoices → Settings tab. Configure:
- Company name, logo, address, phone, email, website
- SIREN / company registration number and VAT/TVA number
- Invoice number prefix and padding (e.g.
INV-+ 4 digits →INV-0001) - Primary accent colour and footer text
- Signature image (PNG with transparent background recommended)
Templates
| Template | Style |
|---|---|
| Classic | Horizontal logo/INVOICE header, three-column billing section |
| Modern | Coloured sidebar with company info, light main column |
| Minimal | Serif typeface, ruled lines, no colour fill — clean & printer-friendly |
| Corporate | Dark navy header, bordered info grid, accent left-border on totals |
15. Drivers
Driver management is disabled by default. Enable it at RideCab → Settings → General → Enable Driver Management.
Once enabled, the Drivers submenu appears. Each driver record links to a WordPress user account. Fields include:
- Linked WP user (for login access)
- License number
- Phone
- Calendar colour (used in the admin calendar)
- Status: Active / Inactive / Suspended
- Commission rate (%)
Assign a driver to a booking on the booking detail page. The calendar will automatically display the booking in the driver's colour.
16. WooCommerce Integration
RideCab uses WooCommerce as its payment engine. The flow is:
- Booking form submitted — fare calculated server-side via
POST /wp-json/ridecab/v1/fare/estimate. - Ride added to WC cart as a virtual product with the calculated price.
- Customer redirected to WC checkout — all WC payment gateways (Stripe, PayPal, bank transfer, COD, etc.) are available automatically.
- Server-side price recalculation on checkout submit — the price is recalculated via
POST /wp-json/ridecab/v1/cart/addto prevent tampering. - WC order created — all booking data stored in WC order meta with
_ridecab_prefix. - RideCab booking record created in
ridecab_bookingstable.
Key WC Meta Keys
| Meta Key | Value |
|---|---|
_ridecab_booking_id | ID in ridecab_bookings table |
_ridecab_pickup_address | Full pickup address text |
_ridecab_dropoff_address | Full drop-off address text |
_ridecab_pickup_datetime | ISO datetime of pickup |
_ridecab_vehicle_type_id | Vehicle type ID |
_ridecab_fare_breakdown | JSON fare breakdown object |
_ridecab_booking_status | RideCab booking status |
_ridecab_driver_id | Assigned driver ID |
17. Shortcodes
[ridecab_booking_form]
Renders the 3-step booking form. Place on any page or post.
[ridecab_booking_form]Google Maps JS is only loaded on pages that contain this shortcode — it is never loaded globally.
18. Translations
RideCab is 100% translation-ready. All strings use the text domain ridecab.
Bundled translations (in /languages/):
| Language | File |
|---|---|
| English (default) | No file needed — built into the plugin |
| French | ridecab-fr_FR.po / .mo |
| German | ridecab-de_DE.po / .mo |
| Spanish | ridecab-es_ES.po / .mo |
| Arabic (RTL) | ridecab-ar.po / .mo |
To add a new language, create a .po file based on ridecab.pot and compile it to .mo with Poedit or msgfmt.
19. FAQ
The booking form shows "Please enter a valid pickup address" even after typing an address.
The booking form requires the user to select a suggestion from the Google autocomplete dropdown. Simply typing an address without selecting a dropdown result does not populate the lat/lng coordinates, which are required to proceed. If no suggestions appear, check that your Google Maps Client API key has the Places API enabled.
The map is not loading on the booking form.
Check that: (1) A Google Maps Client API key is entered in RideCab → Settings → Maps. (2) The key has Maps JavaScript API and Places API enabled. (3) The key is not restricted to an IP that doesn't match the visitor's browser. (4) The page actually contains the [ridecab_booking_form] shortcode — the plugin only loads Google Maps on pages with that shortcode.
The fare estimate shows "—" for some vehicles.
This means the fare calculator returned an error for those vehicles. Common causes: the vehicle's Min Distance is higher than the trip distance, the vehicle's Max Distance is lower than the trip distance, or the vehicle has no pricing rates configured. Check the vehicle's pricing settings.
Prices are not showing in the booking form vehicle cards.
The fare/estimate REST API call failed. Open browser DevTools → Network tab → look for a failed POST /wp-json/ridecab/v1/fare/estimate call. Common causes: (1) WooCommerce is not active, (2) the WordPress REST API is blocked by a security plugin, (3) no vehicles are active.
Can I use RideCab without WooCommerce?
No. WooCommerce is a hard dependency. RideCab uses WooCommerce for all payment processing, checkout, order management, and customer emails. The plugin will not load and will show an admin notice if WooCommerce is not active.
Can I have multiple booking forms with different settings?
Yes. Go to RideCab → Booking Forms → Add New. Each form has its own time interval, map settings, enabled features, and appearance. Use the shortcode shown on the forms list to embed a specific form.
How do I add a coupon / discount code?
Go to RideCab → Coupons → Add New. RideCab has its own coupon system with percentage or fixed discounts, usage limits, per-user limits, minimum fare requirements, and expiry dates. Coupons are applied at the fare estimation step in the booking form.
The driver calendar colours are not showing.
Assign a Calendar Colour to each driver in RideCab → Drivers → Edit Driver. The colour picker sets a hex value stored in the calendar_color column. If the column is missing (can happen on very old installs), the calendar page automatically adds it via a guarded ALTER TABLE on first load.
How do I translate RideCab into my language?
Open the /languages/ridecab.pot file in Poedit, translate all strings, and save as ridecab-{locale}.po (e.g. ridecab-it_IT.po). Compile to .mo format. Upload both files to the plugin's /languages/ directory. WordPress will load the correct file based on the site language.
What data does RideCab store?
RideCab stores booking data in your own WordPress database: customer name, email, phone, pickup and dropoff coordinates, booking date/time, vehicle type, fare breakdown, and IP address (for fraud prevention). No data is ever sent to Canopus servers — everything stays in your database.
Get the Plugin
Ready to deploy RideCab on your site?
One-time purchase — $79 USD. Instant download, lifetime updates included.
Buy RideCab — $79RideCab 1.0.9 — Built by Canopus Web Agency