=== GemBooking - Appointment Scheduling, Booking Calendar & Event Reservations ===
Contributors: kodezen, tusharimran
Tags: appointment booking, online booking, booking system, booking form, rental booking
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Appointment scheduling and booking calendar for WordPress. Take appointment, event and rental bookings with payments and automatic emails.

== Description ==

GemBooking is a complete **WordPress booking plugin** for appointments, services and bookable resources. Publish your availability, let customers pick a date and time on a mobile-friendly booking calendar, collect payment, and have the confirmation email sent automatically - without writing a line of code.

It suits any business that sells time or space: salons and spas, clinics and therapists, consultants and lawyers, photographers, tutors and coaches, studios and gyms, coworking desks, rental gear, courts and meeting rooms.

= Online appointment scheduling =

* **Date and time slot picker** - customers book from a live calendar that only shows slots you are actually free for.
* **Per-service duration and buffer time** - add padding before or after each appointment so back-to-back bookings never collide.
* **Lead time and booking window** - require a minimum notice before an appointment, and stop bookings too far in the future.
* **Weekly availability with date overrides** - set working hours once, then block holidays or open a partial day when you need to.
* **Automatic double-booking protection** - slots are checked against existing bookings and capacity before a booking is accepted.
* **Recurring bookings** - let a customer book the same slot daily, weekly or monthly in one go.
* **Group and party bookings** - set a capacity per slot and collect details for every attendee in the party.

= Resource and rental reservations =

Bookable resources cover anything that is not a person: rooms, desks, courts, studios, vehicles, equipment. Each resource gets its own capacity, pricing and availability rules, and its own public listing page.

= Staff, hosts and multi-location teams =

Assign one or more hosts to a service and the booking form respects each host's own working hours. Team roles keep staff on the screens they need without handing out administrator access.

= Accept payments for bookings =

Connect the built-in WooCommerce or StoreEngine integration and every booking becomes a real order, inheriting your existing prices, taxes, currencies and payment gateways - no separate checkout to configure.

= Custom booking forms =

Build the questions you ask at checkout with a drag-and-drop form builder: text, email, phone, dropdown, radio, checkbox, multi-select and more, per service or shared globally. Mark fields required, and get notified when a specific answer comes in.

= Automated booking emails =

Confirmation, reschedule and cancellation emails are sent automatically to both the customer and the site admin, from templates you can edit in the admin.

= Customer self-service =

A **My Bookings** page lets customers view, reschedule or cancel their own bookings through signed links - and it is embedded as a native tab inside the WooCommerce, StoreEngine and Academy LMS account dashboards, so customers never leave your store to manage a booking.

= Visitor timezone detection =

Times are detected in the visitor's own timezone and shown that way in the slot picker, confirmation screen, My Bookings page and emails, so remote appointments are never booked an hour off.

= Booking management for admins =

* Calendar and list views of every booking, with search and filters by date, status or customer.
* Status workflow - pending, confirmed, cancelled, rescheduled - plus bulk actions.
* Add a booking manually on behalf of a customer straight from the calendar.
* Redirect customers to a thank-you page of your choice after booking.

= Guided setup with industry presets =

The onboarding wizard seeds a working service, availability and booking form from a preset that matches your industry - appointments, photographer, consultant, salon and spa, massage, doctor, therapy, class or studio, fitness, cafe, coworking, catering, shuttle, boat charter, rentals, car rental, gear rental and tutoring.

= Shortcodes =

Drop booking anywhere in your site:

* `[gembooking_service id="123"]` - a single service with its Book Now button
* `[gembooking_service_list]` - a browsable list of services
* `[gembooking_resource]` - bookable resources, one or all
* `[gembooking_event]` / `[gembooking_event_list]` - events
* `[gembooking_flow]` - a full guided booking flow, with or without a picker
* `[gembooking_form]` - a standalone booking form
* `[gembooking_my_bookings]` - the customer booking dashboard
* `[gembooking_customer_panel]` - the customer account panel

= Developer friendly =

Custom database tables with a documented REST API, WP-CLI commands, outgoing webhooks for booking events, and filters throughout the booking solver. Fully translation ready and RTL ready under the `gembooking` text domain.

= GemBooking Pro =

[GemBooking Pro](https://gembooking.net/) is a separate plugin that adds event ticketing with QR check-in, hotel and multi-day stays, restaurant floor plans and table booking, seat-map venues with assigned seating, prepaid packages, dynamic pricing rules, extra services, and Zoom, Google Meet, Google Calendar, Microsoft Teams and SMS integrations.

== Installation ==

1. Upload the `gembooking` folder to `/wp-content/plugins/`, or install it through **Plugins - Add New**.
2. Activate the plugin through the **Plugins** menu.
3. Go to **GemBooking - Dashboard** and run the onboarding wizard. Pick the preset that matches your industry and it will seed a starter service, availability and booking form for you.
4. Set your working hours under the service's availability tab.
5. Publish the booking form on any page or post with the `[gembooking_service id="123"]` shortcode, or link to the service page the plugin already created.

== Frequently Asked Questions ==

= Is GemBooking free? =

Yes. Everything described above works in the free plugin, with no time limit and no feature locked behind an upgrade prompt. GemBooking Pro is a separate, optional plugin for ticketing, hotels, restaurants, seat maps and third-party integrations.

= Can I accept payments for appointments? =

Yes. Activate the WooCommerce or StoreEngine integration and each booking is checked out as a normal order, so your existing gateways, taxes and currency settings apply.

= Does it work with WooCommerce? =

Yes. Bookings can be sold through WooCommerce products, and the customer's **My Bookings** page appears as a tab inside the WooCommerce account dashboard.

= Can customers reschedule or cancel their own bookings? =

Yes, through signed self-service links included in the confirmation email and on the My Bookings page. You can turn rescheduling or cancellation off per service.

= Does it support multiple staff members? =

Yes. Each service can be assigned to one or more hosts, each with their own working hours, and the booking form only offers slots that host is free for.

= Can I prevent double bookings? =

Yes. Every slot is validated against existing bookings, per-slot capacity and buffer time before the booking is saved, so the same slot cannot be taken twice.

= Does it handle different timezones? =

Yes. The visitor's timezone is detected automatically and all times - slot picker, emails, My Bookings - are shown in it, while the booking is stored against your site's timezone.

= Can I take bookings for rooms, equipment or vehicles instead of people? =

Yes. Bookable resources handle anything that is not staff-based, with their own capacity, pricing and availability.

= How do I add the booking form to a page? =

Paste the `[gembooking_service id="123"]` shortcode into any page or post, or use `[gembooking_form]` for a standalone form. The plugin also creates public service and resource pages automatically.

= Is GemBooking translation ready? =

Yes. All strings use the `gembooking` text domain, a POT file ships in `/languages`, and the interface supports RTL languages.

== Privacy ==

GemBooking stores guest-supplied data (name, email, phone, any custom booking-question answers) in custom database tables (`{prefix}_gembk_bookings`, `{prefix}_gembk_booking_meta`). This data is used solely to fulfil and contact the customer about their booking, plus internal admin reports.

No data is sent to third-party services by the core plugin. Optional addons (Zoom, Google Calendar, SMS, payment gateways) only contact their respective vendors when explicitly enabled and configured.

Deleting the plugin does not automatically erase your booking data - the custom tables (`{prefix}_gembk_bookings`, `{prefix}_gembk_booking_meta`, and related availability/account tables) are intentionally preserved so an accidental delete never wipes your records. To remove all stored booking data, drop those `{prefix}_gembk_*` tables and delete the plugin's `gembooking_*` options using your database or hosting tools.

== External services ==

GemBooking's core booking features run entirely on your own server. QR codes for booking share links are rendered locally by the plugin - no third-party image or QR service is contacted - and no booking data leaves your site by default.

The plugin only sends data to an external destination through a feature you explicitly set up:

**Outgoing webhooks (optional).**
If you create a webhook in GemBooking, the plugin sends a signed HTTPS `POST` request to the destination URL that *you* enter, each time the booking event you selected occurs (for example, when a booking is created, cancelled, or rescheduled). The request body contains the details of that booking (such as booking id, status, service/event, times, and the customer name/email/phone as provided). No request is sent unless you add a destination URL, and nothing is sent to GemBooking or Kodezen. Because the destination is a URL you choose, the applicable terms and privacy policy are those of the service you point the webhook at (e.g. your own endpoint, Zapier, Make, or your CRM).

**Optional integrations (via the separate GemBooking Pro plugin).**
Online-meeting, calendar, and SMS integrations (Zoom, Google Meet, Google Calendar, Microsoft Teams, Twilio) are provided by the separate GemBooking Pro add-on and only contact those providers *after* you connect an account and enable the integration. Each provider's data handling is governed by its own terms of service and privacy policy:

* Zoom - https://zoom.us/terms , https://zoom.us/privacy
* Google (Meet / Calendar) - https://policies.google.com/terms , https://policies.google.com/privacy
* Microsoft (Teams) - https://www.microsoft.com/servicesagreement , https://privacy.microsoft.com/privacystatement
* Twilio (SMS) - https://www.twilio.com/legal/tos , https://www.twilio.com/legal/privacy

== Changelog ==

= 1.3.0 = 17-08-2026
* Changed - GemBooking Pro's features now ship entirely inside GemBooking Pro. The free plugin no longer contains any locked, greyed-out or non-functional Pro screens; every control it shows is fully usable.
* Changed - The dynamic pricing, extra services, seat map, floor plan and hotel editors, the Venues and Floors screens and their matching booking-form steps are now added by GemBooking Pro when it is installed.
* Improved - Group attendees (per-attendee details for party bookings) is now a free feature.
* Improved - Booking form builder— field types that your site cannot use are hidden instead of shown as locked options.
* Fixed - StoreEngine shop archive— the "Book Now" button is now swapped in without output buffering, removing an unclosed buffer that could interfere with other plugins on the shop page.

= 1.2.4 = 09-08-2026
* Fixed - Custom database tables now use the WordPress-recommended dbDelta schema format, so activation no longer logs "Multiple primary key defined" database warnings.

= 1.2.2 = 27-07-2026
* Changed - Updated the bundled `chillerlan/php-qrcode` library to version 5 for continued security and compatibility.
* Changed - The full React/Sass source and build configuration now ship with the plugin so the compiled assets are publicly reviewable and reproducible.
* Fixed - Removed a leftover set of `add_action()` calls that were registered without a callback, preventing a possible fatal error on PHP 8+.

= 1.2.1 = 15-07-2026
* Changed - GemBooking now requires PHP 8.1 or higher. On older PHP the plugin stays inactive and shows a notice instead of causing errors.
* Improved - Ticket QR codes are now generated on your own site (no third-party QR image service), so ticket data never leaves your server.
* Improved - Privacy & self-hosting— removed all remote asset calls (fonts, images); the core plugin loads everything locally and contacts no external service by default.
* Improved - WordPress.org compliance & security hardening— input sanitization, output escaping, proper script/style enqueuing, and nonce/permission checks across admin and REST endpoints.
* Improved - Admin notices on GemBooking's own screens are hidden only on those pages, so other plugins' notices are never suppressed elsewhere.
* Fixed - Ticket QR image now loads correctly on sites using plain permalinks.

= 1.2.0 = 25-06-2026
* Added - Timezone auto-detect— booking time fields detect the visitor's own timezone; slot picker, confirmations, My Bookings and emails show times in the customer's zone.
* Added - Dashboard embed— "My Bookings" is now embedded as a native tab inside the WooCommerce, StoreEngine and Academy LMS customer dashboards, so customers manage bookings without leaving the store/LMS.
* Added - My Packages— customers see their purchased packages on the My Bookings page and book the included services/events/resources for free, with a friendly empty state.
* Improved - Add-ons page— credential add-ons reserve a fixed connection slot so toggling/connecting no longer makes the card grid jump.
* Improved - Booking calendar— hover any day (month, week or day view) to reveal an "Add" button that opens Add Booking pre-focused on that date.
* Improved - Manual booking— admin "Add Booking" no longer prefills or assigns the booking to the admin; the real customer is captured and the booking owner resolves from the customer's email.
* Improved - Booking Forms— the advanced builder now unlocks automatically when GemBooking Pro is active (no separate add-on toggle).
* Improved - Ticket scanning— the Tickets admin page now surfaces the frontend "staff scan" page link (with copy), so you can share it with gate staff to redeem tickets from any phone.
* Changed - Packages moved to GemBooking Pro— the Packages feature now requires GemBooking Pro.
* Fixed - Add-on activation crash ("Cannot assign to read only property").
* Fixed - "Show booking products in shop" setting now saves.
* Fixed - Customer Profile page crash on the timezone field.
* Fixed - StoreEngine dashboard "My Bookings" menu icon.
* Fixed - Logged-out My Bookings page now redirects to login and, when active, the store/LMS dashboard.
* Fixed - Team members— assigning an access role no longer overwrites a user's existing roles, and the team UI can no longer grant administrator.
* Fixed - Multi-value booking-form answers (checkbox / multi-select) are now saved correctly instead of being lost.
* Fixed - Deleting a package from the admin list.

= 1.1.0 = 18-06-2026
* Added - Microsoft Teams location option— Microsoft Teams added as a selectable location type when creating or editing calendar events.
* Improved - All admin dashboard UI and frontend booking modal UI
* Fixed - User reschedule and cancellation for booking.
* Fixed - All buttons click page reload issue.
* Fixed - All buttons disable issue.
* Fixed - Onboarding reload issue.

= 1.0.1 = 10-06-2026
* Improved - Ticket selling— Fixed event datetime with sales cutoff, per-tier pricing (Adult / Child / VIP / GA).
* Improved - Tickets List table— Admin table view for managing tickets.
* Improved - Share system— Share bookings and events.
* Improved - Reply Features— Reply to booking notifications.
* Improved - WooCommerce Integration— Full WooCommerce checkout compatibility with prices, taxes, and gateway inheritance.
* Improved - StoreEngine integration— sell bookings through the StoreEngine eCommerce engine (checkout, product linking, order sync).
* Improved - eCommerce Engine system— Flexible eCommerce engine architecture.
* Improved - Price Global Settings— Global pricing configuration.
* Improved - Onboarding wizard— Industry preset system with guided setup.
* Improved - Free presets— Appointments, Photographer, Lawyer/Consultant, Salon/Spa, Massage, Doctor, Therapy, Class/Studio, Fitness, Cafe, Coworking, Catering, Shuttle, Boat Charter, Rentals, Car Rental, Gear Rental, Tutoring.
* Improved - Preset system— Pre-configured booking setups with lock system for Pro presets.
* Added - Taxonomy Support— Custom taxonomy for organizing services, events, and resources. 
* Added - Location features— Location-based booking support with multiple location types (in-person, Zoom, Google Meet, MS Teams, online). 
* Improved - Shortcode—[gembooking_service id="123"]and[gembooking_event]shortcode support.
* Improved - Service & Event archive/single pages— Custom template pages for services and events.
* Improved - My Bookings page— Customer self-service booking management.
* Improved - Settings UI— Complete settings page redesign with organized sections (General, Email, Hotel, Venue).
* Improved - Booking management— Status workflow (pending → confirmed / cancelled / rescheduled), bulk actions, search and filter by date/status/customer.
* Improved - Calendar view— Calendar view added to booking management.
* Improved - Booking details— Updated booking detail views.
* Improved - Reschedule UI— Reschedule and cancellation interfaces.
* Improved - Modal system— Multiple modal types for booking flows, confirmation dialogs before delete.
* Improved - Dashboard UI— Redesigned admin dashboard.
* Improved - Time format— Configurable time format support.
* Improved - Breadcrumbs— Updated breadcrumbs across admin pages.
* Improved - Icons & Colors— Updated icon set and border colors throughout the admin.
* Improved - Security hardening— Fixed multiple security issues across the codebase.
* Improved - Token security— Improved token handling for authentication.
* Improved - Auth fixes— Resolved authentication issues with Zoom server-to-server OAuth.
* Fixed - Timezone compatibility— Fixed timezone issues; now fully compatible with WordPress timezone settings.
* Fixed - Availability rules— Fixed availability rule generation and bug issues.
* Fixed - Preset fixes— Resolved preset pricing, conflicts with StoreEngine, and multiple preset bugs.
* Fixed - Ticket system— Fixed ticket slot picking, attendee types, and booking issues.
* Fixed - Host issues— Fixed event host missing and host member slot generation.
* Fixed - Modal issues— Fixed modal open/close issues across the admin.
* Fixed - Payment issues— Fixed payment processing bugs.
* Fixed - Notification indexing— Fixed notification indexing for proper delivery.
* Fixed - Required fields validation— Fixed form validation for required fields.
* Fixed - Menu option— Fixed admin menu option display.
* Fixed - Lazy load— Removed lazy loading for improved reliability.
* Fixed - Table issues— Fixed various table display and data issues.
* Fixed - Tags and slug— Fixed taxonomy tag and slug issues.
* Fixed - Custom availability— Fixed custom availability override issues.
* Fixed - Slot conflicts— Resolved time slot conflict detection.
* Fixed - Team member slots— Fixed team member slot generation.
* Fixed - Link creation— Fixed link generation issues.
* Fixed - Max capacity— Fixed maximum capacity enforcement.
* Fixed - Booking redirect— Fixed post-booking redirect behavior.
* Fixed - Service duration— Fixed duration and attendee value bugs.
* Fixed - StoreEngine conflicts— Resolved conflicts between presets and StoreEngine.
* Fixed - Meta issues— Fixed save meta not showing and meta data saving issues.
* Fixed - Onboarding issues— Fixed onboarding wizard flow and menu issues.

= 1.0.0 = 26-05-2026
* Initial public release.

== Upgrade Notice ==

= 1.3.0 =
The free plugin no longer ships any locked Pro screens— those features now come from GemBooking Pro itself. Group attendees is now free. Recommended for all users.

= 1.2.4 =
Maintenance release: aligns the custom database tables with the WordPress dbDelta schema format, removing "Multiple primary key" warnings on activation. Recommended for all users.

= 1.2.2 =
Maintenance release: updates the bundled QR-code library to version 5 and fixes a leftover hook registration that could error on PHP 8+. Recommended for all users.

= 1.2.1 =
Requires PHP 8.1+. Ticket QR codes are now generated locally (no third-party service) and all assets load from your own site. Includes security and WordPress.org compliance hardening.

= 1.2.0 =
Adds visitor timezone auto-detect, native "My Bookings" dashboard tabs for WooCommerce / StoreEngine / Academy LMS, and the My Packages self-booking flow. Recommended for all users.
