=== BookPilot AI ===
Contributors: brainstudioz
Tags: booking, appointments, scheduling, staff, woocommerce
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A comprehensive booking management system for WordPress. Manage services, staff, appointments, payments, and notifications from one dashboard.

== Description ==

BookPilot AI lets you accept and manage appointments directly from your WordPress site. Build a fully branded booking experience — no third-party redirect required.

**Key features:**

* **Services & staff** — Create unlimited services with custom pricing, duration, and capacity. Assign staff members with individual schedules and time-off.
* **Three booking views** — Embed the booking widget in Grid, List, or Calendar layout via the included Elementor widget.
* **Payments** — Accept Cash/Pay on Arrival, PayPal Standard, or Stripe. Optionally route everything through **WooCommerce** for unified order management.
* **Coupons** — Create percentage or fixed-amount discount codes with expiry dates and usage limits.
* **Notifications** — Fully customisable confirmation, reminder (24 h ahead), and cancellation emails sent to both the customer and admin.
* **iCal export** — Let customers add their appointment to any calendar app.
* **Elementor widget** — Style every aspect of the booking widget (colours, typography, card layout, button, calendar) with Elementor's visual controls. No coding required.

== Installation ==

1. Upload the `bookpilot-ai` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **BookPilot AI → Settings** to configure your services, staff, and payment options.
4. Add the **BookPilot AI** Elementor widget to any page, or use the `[bpai_booking_form]` shortcode.

== Frequently Asked Questions ==

= Does this plugin work without Elementor? =

Yes. Use the `[bpai_booking_form]` shortcode on any page or post.

= Can I use WooCommerce for payment? =

Yes. Go to **Settings → Payments** and enable *Use WooCommerce for checkout & order management*. Bookings will flow through the WooCommerce cart and checkout, and booking status will sync automatically with the WooCommerce order status.

= Is Stripe or PayPal required? =

No. Cash / Pay on Arrival is enabled by default. Stripe and PayPal are optional.

= Where is booking data stored? =

All bookings, services, staff, and schedules are stored in your own WordPress database. No booking data is sent to external servers by this plugin.

= Does the plugin add any "powered by" links? =

No. The plugin does not add any front-end branding or links without your permission.

== External Services ==

This plugin optionally connects to the following third-party services:

= Stripe (optional) =

If you enable Stripe payments in Settings → Payments, the plugin loads the Stripe.js library from `https://js.stripe.com/v3/` on any page that contains the booking form. This is required by Stripe for PCI DSS compliance; bundling Stripe.js locally is prohibited by Stripe's terms.

When a customer submits a booking with Stripe as the payment method, their card details are sent directly from the browser to Stripe's servers to create a Payment Intent. **No card data passes through your WordPress server.** The plugin sends the Payment Intent amount and currency to Stripe's API (`https://api.stripe.com/v1/payment_intents`) using your configured secret key.

* [Stripe Terms of Service](https://stripe.com/legal/ssa)
* [Stripe Privacy Policy](https://stripe.com/privacy)

= PayPal (optional) =

If you enable PayPal payments, customers are redirected to PayPal's hosted checkout page to complete payment. No payment data is processed on your server.

* [PayPal User Agreement](https://www.paypal.com/us/legalhub/useragreement-full)
* [PayPal Privacy Statement](https://www.paypal.com/us/legalhub/privacy-full)

== Source Code ==

The full, human-readable source code for this plugin (including all build assets and JavaScript source) is publicly available at: https://github.com/derwaish05/bookpilot-ai

The admin calendar view uses FullCalendar v5.11.5 (MIT licence). Source: https://github.com/fullcalendar/fullcalendar
The reports view uses Chart.js v4.5.1 (MIT licence). Source: https://github.com/chartjs/Chart.js
The booking date picker uses Flatpickr v4.6.13 (MIT licence). Source: https://github.com/flatpickr/flatpickr

== Screenshots ==

1. Dashboard — at-a-glance booking stats and upcoming appointments.
2. Booking widget — Grid view with Elementor style controls.
3. Booking widget — Calendar view.
4. Booking modal — 5-step flow (staff → date/time → customer info → payment → confirmation).
5. Admin bookings list — sortable, filterable, with inline status update.
6. Reports — bookings and revenue by service and staff.
7. Settings — payments, notifications, and WooCommerce integration.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade required.
