Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/minsuwai/wp-doctor-booking-system/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Doctor Booking System (Plugin)
Short developer README for the Doctor Booking System plugin.
Overview
This plugin implements a simple doctor/booking system for WordPress. It is meant to be a starting point for custom booking workflows and integrations (REST, headless, or server-rendered).
Core components (files live in plugin root and includes/):
doctor-booking-system.php— main plugin bootstrap (registers includes andplugins_loadedinit)includes/class-cpt-doctor.php— registers thedoctorCPTincludes/class-cpt-booking.php— registers thebookingCPTincludes/class-meta-doctor.php— adds doctor meta boxes and saves metaincludes/class-booking-manager.php— booking business logic (validation, persistence)includes/class-rest-endpoints.php— registers REST routes/endpoints for booking operationsincludes/class-hooks.php— central plugin hooks and filtersincludes/class-roles.php— defines roles/capabilities required by the pluginadmin/class-admin-pages.php— admin pages and UI glue
Public assets are in public/ and admin assets in admin/css and admin/js.
Quick start (developer)
- Activate the plugin in the WordPress admin.
- Create one or more
Doctorposts via the admin. - Use the REST endpoint (example) to create bookings:
curl -X POST 'https://example.com/wp-json/dbs/v1/bookings' \
-H 'Content-Type: application/json' \
-d '{"doctor_id":123,"date":"2025-12-01T09:00:00","user_id":1}'
Adjust the route and payload to match the endpoint implementation in includes/class-rest-endpoints.php.
Extending the plugin
- Add additional doctor meta in
class-meta-doctor.phpand update admin UI accordingly. - Add more REST routes in
class-rest-endpoints.phpfor searching availability, cancelling, or listing bookings. - Hook into booking lifecycle in
class-booking-manager.phpor via actions inclass-hooks.php.
Testing & development notes
- There are no unit tests included by default. For production, add unit tests using WP-CLI and WP PHPUnit.
- When making DB schema or role changes, provide upgrade routines or use activation hooks to migrate safely.
File structure
doctor-booking-system/
├─ admin/
│ ├─ class-admin-pages.php
│ └─ js/ css/
├─ includes/
│ ├─ class-booking-manager.php
│ ├─ class-cpt-booking.php
│ ├─ class-cpt-doctor.php
│ ├─ class-hooks.php
│ ├─ class-meta-doctor.php
│ ├─ class-rest-endpoints.php
│ └─ class-roles.php
├─ public/
│ └─ js/ css/
├─ doctor-booking-system.php
└─ readme.txt
Notes for packaging / submission
- Replace
(yourname)and other placeholders inreadme.txtwith real contributor/author info before publishing to the WordPress plugin directory. - Add plugin screenshots under an
assets/folder for WP.org display assets (icon-128x128, banner, screenshots).
Contact / Support
This README is intentionally minimal. For support or custom work, contact the plugin owner/maintainer.