Transport Booking System
| AI Plugin Information | |
|---|---|
| Version | 2 |
| Download | Download Plugin |
Transport Booking System – WordPress Plugin
A comprehensive WordPress plugin for managing transport booking requests for both personal and school use. This plugin enables staff members to submit booking requests, transport managers to approve/reject them, and accounts teams to be notified of approved personal bookings.
Features
🚌 Dual Booking Types
- Personal Use: Staff can book transport for personal purposes with start/end dates and times
- School Use: Book transport for school trips with destination, passenger count, and special requirements
👥 User Management
- User-friendly booking form with conditional fields based on booking type
- Personal booking history dashboard for users
- Email notifications for booking status updates
🔐 Admin Features
- Dedicated admin interface for managing all bookings
- Approve/reject bookings with optional rejection reasons
- Filter bookings by status (pending, approved, rejected) and type (personal, school)
- Detailed booking information display
- Custom post type for transport bookings
📧 Automated Notifications
- Transport manager receives notifications for new booking requests
- Users receive notifications when bookings are approved/rejected
- Accounts team receives notifications for approved personal bookings
🎨 Responsive Design
- Custom CSS for both frontend and admin interfaces
- Status badges for visual booking status identification
- Mobile-friendly forms and tables
Installation
- Download the plugin
- Upload and Activate the plugin through the ‘Plugins’ menu in your WordPress admin area
- Configure email settings in Transport Bookings > Settings
Requirements
- WordPress: 6.0 or higher
- PHP: 8.0 or higher
- MySQL: 5.6 or higher
Configuration
Email Settings
Navigate to Transport Bookings > Settings in the WordPress admin panel to configure:
- Transport Manager Email: Receives notifications for new booking requests
- Accounts Team Email: Receives notifications for approved personal bookings
Database
The plugin automatically creates a custom database table (wp_transport_bookings) upon activation to store booking details.
Usage
For Users (Staff Members)
Submitting a Booking Request
- Navigate to a page containing the
[ transport_booking_form]shortcode - Select booking type (Personal or School)
- Fill in the required fields based on booking type
- Submit the form
- Receive email confirmation when booking is approved/rejected
Viewing Booking History
- Navigate to a page containing the
[ my_transport_bookings]shortcode - View all your submitted bookings with their current status
For Transport Managers
Managing Bookings
- Go to Transport Bookings in the WordPress admin menu
- View all booking requests in a sortable table
- Filter by status or booking type
- Click View to see detailed booking information
- Approve or reject bookings with optional rejection reasons
For Administrators
Setting Up Pages
Create pages with the following shortcodes:
[ transport_booking_form]
Displays the booking request form
[ my_transport_bookings]
Displays the user’s booking history
Shortcodes
[ transport_booking_form]
Displays the transport booking request form. Users must be logged in to access.
Example:
[ transport_booking_form]
[ my_transport_bookings]
Displays a table of the current user’s booking history with status information.
Example:
[ my_transport_bookings]
Booking Types
Personal Use Booking
Required fields:
- Start Date
- Start Time
- End Date
- End Time
- Purpose (optional)
Workflow:
- User submits request
- Transport manager approves/rejects
- If approved, accounts team is notified
School Use Booking
Required fields:
- Date Required
- Departure Time
- Return Time
- Destination
- Purpose of Trip
- Number of Passengers
- Special Requirements (optional)
Workflow:
- User submits request
- Transport manager approves/rejects
- User is notified of decision
File Structure
aiplugin5417/
├── aiplugin5417.php # Main plugin file
├── README.md # This file
├── composer.json # Composer dependencies
├── src/
│ ├── aiplugin5417/
│ │ └── TransportBookingSystem.php # Core booking system class
│ ├── css/
│ │ ├── transport-booking.css # Frontend styles
│ │ └── transport-booking-admin.css # Admin styles
│ ├── js/
│ │ ├── transport-booking.js # Frontend JavaScript
│ │ └── transport-booking-admin.js # Admin JavaScript
│ └── plugin-update-checker/ # Auto-update functionality
└── docs/
└── wordpress-plugin-architecture-guide.md
Database Schema
Table: wp_transport_bookings
| Column | Type | Description |
|---|---|---|
id |
bigint(20) | Primary key |
post_id |
bigint(20) | Associated post ID |
user_id |
bigint(20) | User who created booking |
booking_type |
varchar(20) | ‘personal’ or ‘school’ |
start_date |
datetime | Booking start date |
end_date |
datetime | Booking end date (personal only) |
start_time |
time | Start/departure time |
end_time |
time | End/return time |
status |
varchar(20) | ‘pending’, ‘approved’, or ‘rejected’ |
school_purpose |
text | Purpose for school bookings |
school_destination |
varchar(255) | Destination for school bookings |
school_passenger_count |
int | Number of passengers |
school_special_requirements |
text | Special requirements |
created_at |
datetime | Record creation timestamp |
updated_at |
datetime | Last update timestamp |
Hooks & Filters
Actions
init– Registers custom post typeadmin_menu– Adds admin menu pageswp_enqueue_scripts– Enqueues frontend assetsadmin_enqueue_scripts– Enqueues admin assetswp_ajax_submit_transport_booking– Handles booking submissionswp_ajax_approve_transport_booking– Handles booking approvalswp_ajax_reject_transport_booking– Handles booking rejections
Custom Post Type
- Post Type:
transport_booking - Capabilities: Based on standard post capabilities
- Supports: Title, Author
Security Features
- Nonce verification for all form submissions
- AJAX request validation
- User capability checks
- Data sanitization and validation
- SQL injection prevention through WordPress database API
Email Notifications
New Booking Request
- Recipient: Transport Manager
- Trigger: User submits booking
- Contains: Booking ID, type, requester info, date
Booking Approved
- Recipient: User who submitted booking
- Trigger: Manager approves booking
- Contains: Booking ID, type, approval confirmation
Booking Rejected
- Recipient: User who submitted booking
- Trigger: Manager rejects booking
- Contains: Booking ID, type, rejection reason
Personal Booking Approved
- Recipient: Accounts Team
- Trigger: Manager approves personal booking
- Contains: Booking ID, staff member info, dates
Troubleshooting
Bookings Not Appearing
- Ensure the plugin is activated
- Check user permissions (users must be logged in)
- Verify database table was created during activation
Email Notifications Not Sending
- Check WordPress email configuration
- Verify email addresses in Transport Bookings > Settings
- Test with an SMTP plugin if needed
Shortcodes Not Working
- Ensure shortcodes are placed in post/page content
- Check that users are logged in (required for both shortcodes)
- Clear cache if using a caching plugin
Development
JavaScript Modules
The plugin uses WordPress Script Modules API for modern JavaScript:
- [
aiplugin5417.js](src/js/aiplugin5417.js) – Main entry point - [
transport-booking.js](src/js/transport-booking.js) – Frontend booking form handling - [
transport-booking-admin.js](src/js/transport-booking-admin.js) – Admin interface interactions
CSS Customization
Override styles by adding custom CSS to your theme:
/* Customize booking form */
.transport-booking-form-container {
/* Your custom styles */
}
/* Customize status badges */
.status-badge {
/* Your custom styles */
}
Support
For support, feature requests, or bug reports, please contact the plugin author.
License
Copyright (C) AI_PLUGIN_DEV 2026. ALL RIGHTS RESERVED. THIS IS NOT FREE SOFTWARE.
Credits
- Author: JohnDee
- Plugin URI: https://aiplugin.dev/ai-plugin/l2DWfTnwN3
- Version: 2
Changelog
Version 2 (Current)
- Complete transport booking system implementation
- Personal and school booking types
- Admin approval workflow
- Email notification system
- Custom database table
- Responsive frontend and admin interfaces
- Shortcode support for easy integration
Note: This plugin requires users to be logged in to submit and view bookings. Ensure your WordPress site has user registration enabled or manually create user accounts for staff members.

