=== Shark Booking by Carson ===
Contributors: carsonleung, freemius
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.1
Text Domain: shark-booking-by-carson
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: booking, appointments, stripe, scheduling, calendar

Appointments, Stripe payments, and booking operations for WordPress.

== Description ==

Shark Booking by Carson is an installable plugin for businesses that need a streamlined appointment booking flow on any WordPress site.

Features:

* Admin booking list and calendar views (day, week, month) with filters.
* Service management with duration, buffers, pricing, currency, and active status.
* Resource management with service assignments and weekly schedule editing.
* Availability management with weekly rules and date-specific overrides.
* Frontend booking flow via shortcode.
* Stripe Checkout flow for bookings.
* Stripe webhook processing with idempotency safeguards.
* Quote and pricing engine.
* Manual admin actions for bookings (edit, delete, resend customer notification).
* Built-in FAQ screen and Contact entry point in the admin menu.
* Security hardening for public booking APIs (same-origin checks, rate limits, and nonce-aware permission callbacks for logged-in sessions).

Use `[booking_appointment_flow]` for the appointment booking flow.

== Installation ==

1. Upload the `shark-booking-by-carson` folder to `/wp-content/plugins/` (main file: `shark-booking-by-carson.php`).
2. Activate the plugin in the WordPress admin.
3. Go to `Bookings > Settings` and configure timezone, currency, and Stripe keys.
4. Create services under `Bookings > Services`.
5. Create resources under `Bookings > Resources`.
6. Add availability rules under `Bookings > Availability`.
7. Add `[booking_appointment_flow]` to a page and publish it.
8. Configure the Stripe webhook endpoint to:
   `/wp-json/sharkbooking/v1/stripe/webhook`

== Frequently Asked Questions ==

= How do I set up the plugin for the first time? =

Configure timezone and currency in Settings, then create Services, Resources, and Availability rules.

= How do I create a booking page? =

Create or edit a WordPress page and add the shortcode `[booking_appointment_flow]`, then publish the page.

= What can I manage in the admin area? =

You can manage bookings, services, resources, and availability.

= Does it support multiple staff members or rooms? =

Yes. Each resource can be assigned to specific services and can have its own weekly and date-specific availability.

= How does Stripe confirmation work? =

Bookings are finalized after Stripe webhook confirmation at `/wp-json/sharkbooking/v1/stripe/webhook`.

= Can admins manually create or edit bookings? =

Yes. Admins can create, edit, update status, send notifications, and delete bookings from Booking List and Calendar.

= Does this plugin connect to external services? =

Yes, in three feature-specific cases:

* Stripe payment and webhook APIs are used for checkout/payment processing when Stripe keys are configured.
* Freemius is used for account, plan, and entitlement checks tied to premium module loading.
* If an admin submits the in-plugin Contact form (`Bookings > FAQ`), the entered name, email, and message are sent to Shark Booking by Carson support via email.

== External services ==

= Stripe =

This plugin uses Stripe Checkout and webhook APIs to process booking payments.

Data sent: checkout/payment fields such as transaction amount, selected items, customer email, and callback metadata needed to reconcile booking records.

When sent: when a customer starts checkout and when Stripe calls the webhook endpoint after payment events.

Terms of Service: https://stripe.com/legal/ssa
Privacy Policy: https://stripe.com/privacy

= Freemius =

This plugin uses Freemius for subscription/account management and premium entitlement checks.

Data sent: installation/account metadata required by Freemius to manage plan/account status and entitlement.

When sent: during Freemius account/plan pages and entitlement synchronization checks.

Terms of Service: https://freemius.com/terms/
Privacy Policy: https://freemius.com/privacy/

= What if email delivery fails? =

The plugin uses WordPress `wp_mail()`. Delivery depends on your hosting mail setup or SMTP/mail plugin.

== Changelog ==

= 1.0.1 =

* Bug fix on permission access
* Bug fix on the issue where saved Services, Packages, Additional Services, Resources & Availability doesn't save occassionally
* UI Enhancement across all pages


= 1.0.0 =

* Initial release with services, resources, availability rules, bookings, Stripe checkout, webhook confirmation, and email notifications.
