=== Divine Appointment Booking Lite ===
Contributors: divinecode01
Tags: appointments, booking, scheduling, calendar, appointment booking
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Simple appointment booking with per-service pricing, date and time selection, email notifications, and a REST API for integrations.

== Description ==

Divine Appointment Booking Lite is a lightweight appointment booking plugin. Let your customers pick a service, choose a date and time, and book — payment is collected at the appointment, so there is nothing to configure and no payment gateway to set up.

**Features**

* Per-service pricing — every service gets its own rate
* Clean 2-step booking flow: date/time, then details
* Custom calendar that respects business days, hours, and blocked dates
* Minimum notice period and maximum advance booking window
* HTML email notifications to the customer and the site admin
* Status update emails when you confirm, complete, or cancel a booking
* Admin dashboard with filterable booking list and inline status changes
* Configurable payment note (e.g. "Payment collected at your appointment — cash or card")
* REST API with API-key authentication for external integrations
* Shortcode based — works with any theme and any page builder
* No external services, no tracking, no build tools

**Usage**

Add the shortcode to any page or post:

`[dcabl_booking]`

**REST API**

Enable the API by setting an API key under Divine Appointment Booking Lite → Settings → API / Integrations. Requests must include the key in the `X-Divine-Key` header. Endpoints include:

* `GET /wp-json/divine-booking/v1/services`
* `GET /wp-json/divine-booking/v1/available-dates?month=YYYY-MM`
* `GET /wp-json/divine-booking/v1/available-slots?date=YYYY-MM-DD`
* `POST /wp-json/divine-booking/v1/book`
* `GET /wp-json/divine-booking/v1/appointment?id=` or `?email=`
* `POST /wp-json/divine-booking/v1/reschedule`
* `POST /wp-json/divine-booking/v1/cancel`
* `GET /wp-json/divine-booking/v1/business-info`

The API is disabled until you set a key.

== Installation ==

1. Upload the `divine-appointment-booking-lite` folder to `/wp-content/plugins/`, or install through the WordPress Plugins screen.
2. Activate the plugin.
3. Go to **Divine Appointment Booking Lite → Settings** to configure your services, schedule, and emails.
4. Add the `[dcabl_booking]` shortcode to any page.

== Frequently Asked Questions ==

= How do customers pay? =

Payment is collected at the appointment (pay on arrival). You can customize the payment note shown on the booking form and in the confirmation email — for example, "We accept cash and card at the studio."

= How do I add services with different prices? =

Go to Settings → General and enter one service per line in the format `Service Name|Price`, for example `Consultation|100`.

= What happens when someone books? =

The booking is saved with **pending** status, the customer receives a confirmation email, and the admin receives a notification. You can confirm, complete, or cancel the booking from the dashboard — each status change emails the customer.

= Can two people book the same slot? =

No. Slots with a pending or confirmed booking are shown as unavailable, and the server rejects double-bookings even if two people submit at the same moment.

= Does this plugin call any external services? =

No. Everything runs on your own site. Emails are sent through the standard WordPress mail system.

= Is my data removed if I delete the plugin? =

Yes. Deleting the plugin removes all plugin options and drops the bookings table. Deactivating does not remove anything.

== Screenshots ==

1. Booking form — calendar and time slot selection
2. Booking form — customer details and service with price
3. Confirmation screen
4. Admin — appointments list with status management
5. Admin — settings

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
