=== BookWellNow - Appointment Booking ===
Contributors: vijaybookwellnow
Tags: appointment booking, booking plugin, appointment scheduler, calendar booking, booking popup button
Requires at least: 5.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 4.0.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let customers choose a service, staff member, and time slot online. Includes unlimited staff, Zoom, PayPal Checkout, and a customer panel.

== Description ==

BookWellNow helps you take service bookings on your WordPress site. Customers pick a service, a staff member, and an available time, then confirm. You can collect PayPal Checkout or pay-on-arrival payments, and optionally create a Zoom meeting for the visit.

There is no per-staff or per-service limit in the free version. You manage working hours, shifts, holidays, and special days from the WordPress admin. Customers can log in to a panel to view history and cancel when you allow it.

= Free Features =

* Appointment Booking Popup Button
* Free Zoom Meeting
* Overnight booking supported
* Free Unlimited Staff Members
* Free Unlimited Services
* Free PayPal Payment Gateway
* Free Staff Shift Management
* Free Staff Holiday Management
* Free Customer Panel
* Free Customer Appointment Cancellation
* Lightweight & Very Fast Loading
* Online Appointment Scheduling
* Booking Calendar Management
* Mobile-Friendly Booking Experience

= Pro Features =

The free plugin covers the workflow above. [BookWellNow Pro](https://bookwellnow.com/) adds:

* Google Calendar two-way sync
* Google Meet
* Custom fields
* Buffer time
* Reschedule
* Scheduled notifications
* WooCommerce payment gateways
* Service extras and rules

= Getting started =

1. Activate the plugin and open **Book Well Now** in the admin menu.
2. Add at least one service and one staff member, then assign the staff member to the service.
3. Set working hours (and holidays if needed) for that staff member.
4. Place a shortcode on a page (see below).
5. Optionally enable PayPal or Zoom under **Settings**.

[youtube https://www.youtube.com/watch?v=0BYcMaXaDe4]

= Shortcodes =

Create shortcodes from **Book Well Now → Shortcode Generator**, or paste them into a page or post.

**Form popup button**

`[bookwell_booking_button]`

Places a button that opens the form in a popup. You do not need `[bookwell_booking]` on the same page.

* `service_id` - pre-select a service (useful on a service page)
* `staff_id` - show only that staff member’s services
* `label` and `class` - button text and extra CSS class

Examples:

`[bookwell_booking_button label="Book Now"]`

`[bookwell_booking_button service_id="2" label="Book this service"]`

`[bookwell_booking_button staff_id="1" label="Book with this staff"]`

`[bookwell_booking_button service_id="2" staff_id="1" label="Book now"]`

**Inline form**

`[bookwell_booking]`

Shows the form on the page. In **Settings → Appearance** (or Shortcode Generator) choose **Small Booking Wizard** or **Service List with Popup**.

Optional attributes: `staff_id`, `service_id`

`[bookwell_booking]`

`[bookwell_booking staff_id="1" service_id="2"]`

**Customer panel**

`[bookwellnow_customer_panel]`

Shows the logged-in customer area (history, profile, and cancellation).

= Availability =

* Customers see only open dates and time slots
* Overlapping times for the same staff member are blocked
* Working hours, breaks, holidays, and special days control what is offered
* Overnight hours: set start and end across midnight (for example 2:00 PM to 2:00 AM the next day)

= Staff and services =

* Add as many staff members and services as you need
* Assign services to staff and set duration and price
* Auto-select when only one service or staff member applies

= Customer panel =

* Customers log in to see upcoming and past visits
* They can cancel when cancellation is enabled
* Optional WordPress user creation when someone books (Settings → Customer Panel)

= Payments =

* Pay on arrival / manual
* PayPal Checkout (sandbox and live)

= Emails =

* Confirmation and status update emails
* Placeholders for Zoom join/host links when Zoom is enabled

= Who it is for =

Clinics, salons, trainers, tutors, consultants, local trades, photographers, auto shops, event studios, and pet services - any team that sells time-based services.

= Security and permissions =

Admin screens use capability checks and nonces. Notification settings are limited to users who can manage plugin settings.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/`
2. Activate it from **Plugins** in WordPress
3. Open **Book Well Now** in the dashboard
4. Add a service and staff member, then put `[bookwell_booking]` (or the popup button shortcode) on a page

== Frequently Asked Questions ==

= How do I put the form on a page? =
Add `[bookwell_booking]` to any page. You can generate a shortcode with optional staff or service filters from **Book Well Now → Shortcode Generator**.

= How do I open the form from a button? =
Use `[bookwell_booking_button]`. Example: `[bookwell_booking_button service_id="2" label="Book now"]`. The same form opens in a popup.

= Can I set staff working hours and time off? =
Yes. Each staff member has shifts, breaks, holidays, and special days.

= Can customers cancel on their own? =
Yes, from the customer panel when cancellation is enabled.

= Does it stop two people taking the same slot? =
Yes. Availability is checked when the slot list is built and again when the booking is saved.

= Is there a staff or service limit? =
No. The free version does not cap how many staff members or services you can add.

= Can I take PayPal payments? =
Yes. PayPal Checkout supports sandbox and live mode. You can also use pay on arrival / manual payment.

= Is overnight (after midnight) supported? =
Yes. On a working day, set Start Time and End Time across midnight. Example: 2:00 PM to 2:00 AM the next day. That range is treated as one continuous shift.

== Third-Party Libraries ==

This plugin bundles the following third-party libraries (see `THIRD-PARTY-LICENSES.txt` for versions and licenses):

* Vue.js (MIT) - https://vuejs.org/
* Element Plus / Element Plus Icons (MIT) - https://element-plus.org/
* Axios (MIT) - https://axios-http.com/
* Qs (BSD-3-Clause) - https://github.com/ljharb/qs
* SortableJS (MIT) - https://sortablejs.github.io/Sortable/
* Chart.js (MIT) - https://www.chartjs.org/
* intl-tel-input (MIT) - https://github.com/jackocnr/intl-tel-input

Bundled minified vendor files (for example `*.min.js`) are third-party libraries, not obfuscated plugin code. Upstream sources are listed in `THIRD-PARTY-LICENSES.txt`.

== External Services ==

= Google Fonts =

When a Google font is selected in appearance settings, the booking form may load fonts from `https://fonts.googleapis.com/` (Google LLC). Browser request data (IP, user agent, requested font) is sent only on pages where the booking form is shown. Privacy: https://policies.google.com/privacy

= PayPal Checkout =

When PayPal is enabled, payments use the PayPal Checkout SDK and Orders API (`https://www.paypal.com/sdk/js`, `https://api-m.paypal.com/`, sandbox API). Booking amount, currency, appointment reference, and standard request headers are sent during checkout. Credentials are stored in WordPress; only the Client ID is exposed on the frontend. Privacy: https://www.paypal.com/us/legalhub/privacy-full

= Zoom Meetings =

When Zoom is enabled (Settings → Integrations), BookWellNow uses Zoom Server-to-Server OAuth (`https://zoom.us/oauth/token`, `https://api.zoom.us/v2/`) to list users and create/delete meetings. Account ID, Client ID, and Client Secret are stored in WordPress. Meeting join/host URLs are saved on appointments. Privacy: https://explore.zoom.us/en/privacy/

== Changelog ==

= 4.0.5 =
* Updated plugin description to follow WordPress.org guidelines (clear usage instructions, no keyword stuffing).

= 4.0.4 =
* Fixed design issue.

= 4.0.3 =
* Added Admin Note row action on the Appointments list.

= 4.0.2 =
* Fixed Designing issue.

= 4.0.1 =
* Fixed blurry country flag icons on the booking form phone field (live/CDN environments).
* Replaced the intl-tel-input flag sprite with individual country flag images.
* Added `assets/css/iti-country-flags.css` and per-country PNGs under `assets/img/flags/`.

= 4.0.0 =
* Improved frontend booking form design on mobile and desktop.
* Staff Member step: two-column staff grid on mobile; single staff displays full width.
* Fixed booking form layout and staff card display issues.

= 3.0.9 =
* Added overnight staff shifts and special days (extended end/break times up to next day) with frontend +1 day slot labels.
* Added bulk select actions for appointments, services, staff, and customers.
* Dashboard Day Preview service filter now includes disabled services.
* Fixed booking form stretching too tall on large screens by capping form max height.
* Special/Holiday Days: disable End Date days before Start Date and validate end date on save.
* Special/Holiday Days: show Start/End dates using the Default Date Format from Settings → General.

= 3.0.8 =
* Fixed RTL Issue.

= 3.0.7 =
* Designing bug fixed

= 3.0.6 =
* Added Full Width / Half Width setting for Form Fields (admin toolbar + frontend booking layout).
* Adds `bw_field_width` column on form fields table for fresh installs and upgrades.
* Added Week Starts On setting in Settings → General (default: Monday) for booking and admin calendars.
* Styled settings helper/instruction text consistently 
* Locked booking sidebar tabs after a successful booking confirmation.
* Updated translation template and language files.

= 3.0.3 =
* Improved Settings sidebar card navigation and Payment Gateways boxed layout.
* Debug log modal: scrollable log data, fixed header, and pagination footer.
* Zoom field notes moved to info-icon tooltips on service and staff drawers.
* Ensures Zoom database columns and Zoom settings, payment debug log table, and Email Notification Debug Log settings on fresh install and plugin update.
* Added free Zoom Meetings integration (Server-to-Server OAuth) under Settings → Integrations.
* Enable Zoom per staff (assign Zoom user) and per service; meetings are created when appointments are booked.
* Start Zoom from admin appointments / calendar drawer; customers can Join Zoom from the customer panel.
* Email notification placeholders: `%zoom_join_url%`, `%zoom_host_url%`.
* Added Email Notification Debug Logs under Settings → Debug Log (enable, view, download, clear).

= 3.0.1 =
* Added Service List with Popup booking form type (service grid + booking wizard popup).
* Added Booking Form Popup Button shortcode `[bookwell_booking_button]` to open the same booking popup from any page (optional `service_id`, `staff_id`, and `label`).
* Added Customized Form Options: hide service description and show staff designation.
* Form Type can be chosen in Settings → Appearance and in Shortcode Generator (shared setting).
* Shortcode Generator: hide service filter when Service List with Popup is selected.
* Improved single-service catalog card width on desktop and mobile popup close button.
* Seeds appearance form options (`form_type`, `hide_description`, `show_staff_designation`) on fresh install and plugin update.

= 3.0.0 =
* Added free customer panel with login, appointment history, account management, and customer appointment cancellation.
* Added Settings → Customer Panel tab with configurable labels and optional WordPress user creation on booking.
* Improved frontend service list layout on tablet and mobile.
* Service images now generate and store a custom 250×250 medium size URL on upload/save.
* Updated translation template and language files for new strings.

= 2.0.9 =
* Service images now generate and store a custom 250×250 medium size URL on upload/save.
* Customer panel database migration: adds `bw_wp_user_id` column and index on the customers table, seeds default Customer Panel settings, and registers the `bookwellnow-customer` role on fresh install and plugin update.
* Customer panel uses the same dynamic booking form appearance colors, fonts, and button styling.
* Added Settings → Customer Panel tab with “Create WordPress user upon appointment booking”.
* When enabled, bookings create a WordPress role user and link it to the customer record.

= 2.0.6 =
* Added Form Fields admin page to customize booking form customer details (phone, first name, last name, email, note, and terms & conditions) with required, label, placeholder, error message, hide/show, and drag-and-drop order.
* Added dedicated `wp_bookwellab_form_fields` database table with automatic migration from earlier settings storage and legacy Booking Form Labels.
* Frontend Your Details step now uses saved form field settings for visibility, labels, placeholders, and validation.
* Removed duplicate customer field labels from Settings → Booking Form Labels; use Form Fields for those settings instead.
* Fresh installs seed default form fields on activation; upgrades preserve customized labels from older versions.

= 2.0.5 =
* Fixed frontend booking notification emails to match the default appointment status (Approved or Pending), including after PayPal payment confirmation.
* Added public cancel appointment link placeholder (%cancel_appointment_link%) for customer notification emails with a guest-safe cancellation page.

= 2.0.4 =
* Added terms & conditions acceptance checkbox on the frontend booking Your Details step with customizable label text and link URL in Booking Form Labels.
* Fixed frontend phone field country flag and dropdown arrow display.
* Updated translation template and language files for new strings.

= 2.0.3 =
* Fixed design issues in the admin Add/Edit Appointment drawer (required field markers, label spacing, service dropdown width, customer search display, status and payment layout, and price summary placement).
* Added custom admin menu icon.

= 2.0.2 =
* Fixed Designing Issue
* Updated translation template and language files for new strings.

= 2.0.1 =
* Fixed default country and dial code storage so United States and Canada (+1) can be selected correctly.
* Added PayPal unsupported currency admin warning and frontend gateway hiding.
* Fixed setup wizard flash of uncompiled Vue templates on first load.
* Updated translation template and language files for new strings.

= 2.0.0 =
* Major release with PayPal Checkout, payment debug log, and manually payment method.
* Added 10 booking form appearance themes with live apply and frontend cache refresh.
* Improved PayPal currency validation, stale pending cleanup, and payment security hardening.
* Fixed default country vs dial code selection (US and Canada both use +1).
* Improved frontend staff data privacy and setup wizard load experience.

= 1.0.2 =
* Fixed slow Customers admin list loading with large customer counts by paginating customers first and fetching appointment stats only for the current page.
* Improved Appointments admin list pagination.
* Fixed design issues in the front-end booking form.
* Added Day Calendar option.

= 1.0.1 =
* Fixed Dashboard Day Preview segment positioning so appointment bars render at the correct timeline slot.
* Fixed Day Preview timeline range calculation to respect staff working hours (for example 9 AM to 5 PM no longer starts at 8 AM unless data requires it).
* Improved admin day preview time parsing to correctly handle 12-hour and 24-hour formats without reversing AM/PM placement.
* Spam-token storage moved to custom table with reusable DB helpers and safe upgrade cleanup.

= 1.0.0 =
* Initial public release.

== Upgrade Notice ==

= 4.0.5 =
Updated plugin directory description for WordPress.org guidelines.

= 4.0.4 =
Fixed design issue.

= 4.0.3 =
Adds Admin Note on the Appointments list and a database column for internal staff notes.

= 4.0.1 =
Fixes blurry phone-field country flags by using individual flag images instead of a CDN-crushed sprite sheet.

= 4.0.0 =
Design improvements for the frontend booking form, including mobile staff layout (two columns; full width when only one staff).

= 3.0.9 =
Overnight booking support and schema update for staff shift time columns. Also adds bulk actions for appointments, services, staff, and customers.

= 3.0.8 =
Fixes RTL phone input overlap on the booking form Details step.

= 3.0.7 =
Month slot caching, Meet/Zoom icon layout, and safe schema checks on install/update. Use with Pro 1.0.7 for Google Calendar busy blocking.