WP Manifestindependent plugin directory
manifest / events / wp-doctor-booking-system

Doctor Booking System

This is booking system plugin for WordPress

by minsuwai · github.com/minsuwai/wp-doctor-booking-system

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/minsuwai/wp-doctor-booking-system/archive/refs/heads/main.zip

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 and plugins_loaded init)
  • includes/class-cpt-doctor.php — registers the doctor CPT
  • includes/class-cpt-booking.php — registers the booking CPT
  • includes/class-meta-doctor.php — adds doctor meta boxes and saves meta
  • includes/class-booking-manager.php — booking business logic (validation, persistence)
  • includes/class-rest-endpoints.php — registers REST routes/endpoints for booking operations
  • includes/class-hooks.php — central plugin hooks and filters
  • includes/class-roles.php — defines roles/capabilities required by the plugin
  • admin/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)

  1. Activate the plugin in the WordPress admin.
  2. Create one or more Doctor posts via the admin.
  3. 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.php and update admin UI accordingly.
  • Add more REST routes in class-rest-endpoints.php for searching availability, cancelling, or listing bookings.
  • Hook into booking lifecycle in class-booking-manager.php or via actions in class-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 in readme.txt with 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.