=== Yatoon Booking System ===
Contributors: yatoon, freemius
Tags: booking, appointments, scheduling, salon, spa
Requires at least: 5.8
Tested up to: 6.9
Stable tag: 5.2.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Beautiful, full-featured appointment booking system for salons, spas, and service businesses. Works 100% locally �?no third-party accounts required.

Full version history is also maintained in `CHANGELOG.md`.

== Description ==

**Yatoon Booking System** is a professional appointment booking plugin built for salons, nail studios, spas, and any service business that takes appointments.

Customers book online through a clean, mobile-friendly multi-step form embedded on any page. You manage everything from the WordPress dashboard �?no monthly fees, no third-party accounts needed in the free version.

= �?Free Features =

**Customer-Facing Booking Form**
* Beautiful multi-step booking flow: Service �?Options �?Staff �?Date & Time �?Details
* Multi-service booking �?customers can add multiple services in one appointment
* Guest booking �?book for multiple people (e.g. couples, friends) in one session
* Smart staff assignment �?"Any available staff" or pick a specific person
* Real-time time slot availability
* Mobile-friendly with floating cart bar
* Customer portal �?view, manage, and cancel upcoming appointments

**Service & Staff Management**
* Unlimited services with categories, pricing, duration, descriptions, and photos
* Add-on options per service (e.g. nail art, gel top coat)
* Staff profiles with photos, bios, and service assignments
* Unlimited staff members in Pro
* Individual staff schedules and working hours

**Booking Management**
* Full booking calendar and list view in the dashboard
* Reports dashboard for bookings, revenue, top services, and staff performance
* Manual booking creation and editing by admin
* Booking status management (pending, confirmed, completed, no-show, cancelled)
* Staff calendar view for daily operations
* Square POS payment tracking (unpaid, paid in Square POS, deposit paid, refunded, waived)
* Customer contact details and appointment notes
* Waitlist management for fully booked time slots
* Waitlist automation �?customers can be emailed when a matching opening appears
* Customer blacklist (block repeat no-shows)
* Starter data is created automatically on empty installs for faster first-time setup and testing
* Staff time-off and blocked-time rules can be added directly to each staff profile in local mode

**Notifications & Communication**
* Automatic email confirmations to customers
* Customizable email subject and template
* Contact message inbox (customers can message you from the booking form)

**Business Settings**
* Business hours and closed days configuration
* Booking lead time (minimum advance notice required)
* Maximum future booking window
* Latest appointment end-time cutoff
* Anti-abuse protection (limit bookings per phone number)
* Optional cancellation / no-show policy acknowledgement
* Optional consent / waiver signature, globally or per service
* Per-service booking rules for policy, consent, staff selection, buffers, and minimum lead time

= 🔒 Pro Features (Upgrade to unlock) =

* **Square POS sync** �?two-way sync of services, staff, and bookings with your Square account
* **Vagaro sync** �?import appointments from Vagaro
* **SMS Notifications** �?automated booking confirmations and reminders via Twilio
* **Google Calendar sync** �?appointments appear on your Google Calendar automatically
* **Brand & Colors** �?customize logo, colors, fonts, button labels, and border radius to match your brand
* **Unlimited staff** �?add, edit, and manage unlimited staff directly from WordPress
* **Growth Modules** �?optional coupons, service packages, and membership records with admin switches
* **Priority support**

[Upgrade to Pro →](https://yatoon.com/pricing)

= How It Works =

1. Install and activate the plugin
2. Add your services and staff in the WordPress dashboard
3. Set your business hours
4. Add the shortcode `[yatoon_booking]` to any page
5. Customers can start booking immediately

= Perfect For =

* Nail salons and nail studios
* Hair salons and barbershops
* Spas and massage studios
* Esthetics and skincare clinics
* Lash and brow bars
* Any small service business taking appointments

== Installation ==

1. Download and upload the plugin ZIP via **WordPress Admin �?Plugins �?Add New �?Upload Plugin**
2. Activate the plugin
3. Go to **Yatoon Booking �?Settings** to configure your business hours and email settings
4. Go to **Yatoon Booking �?Services** to add your services
5. Go to **Yatoon Booking �?Staff** to add your staff members
6. Add `[yatoon_booking]` shortcode to any page to display the booking form
7. That's it �?your booking page is live!

== Frequently Asked Questions ==

= Does this plugin work without Square or any other third-party account? =
Yes! The free version is 100% local. Everything �?services, staff, bookings, availability �?is managed inside WordPress. No Square account, no API keys, no external services needed.

= How do customers book appointments? =
Add the shortcode `[yatoon_booking]` to any WordPress page. Customers will see a beautiful multi-step booking form where they can choose a service, staff member, date and time, and enter their contact details.

= Can customers book for multiple people at once? =
Yes! The booking form supports group bookings. Customers can add services for themselves and additional guests (Guest, Guest 2, etc.) all in one appointment session.

= Can I add multiple services per appointment? =
Yes. Customers can add multiple services for themselves or for each person in their group. The form automatically calculates total duration and finds available time slots that fit everything.

= Does it work on mobile? =
Yes, fully. The booking form is responsive and mobile-optimized, with a floating cart bar that keeps the appointment summary visible while browsing services.

= How do I limit how far in advance customers can book? =
Go to **Yatoon Booking �?Settings** and set the "Maximum booking window" (e.g. 60 days in advance) and "Minimum lead time" (e.g. 2 hours notice required).

= Can I block specific customers? =
Yes. Go to **Yatoon Booking �?Blacklist** and add customer phone numbers to prevent them from making new bookings.

= What happens when a time slot is fully booked? =
Customers can join a waitlist. You'll see waitlisted customers in **Yatoon Booking �?Waitlist** and can contact them if a cancellation opens up.

= How do I upgrade to Pro? =
Click **⬆️ Upgrade to Pro** in the Yatoon Booking admin sidebar, or visit [yatoon.com/pricing](https://yatoon.com/pricing). After purchase, download the Pro ZIP from your account and install it via **Plugins �?Add New �?Upload Plugin**.

= Does the free version have any limits on services or staff? =
Services are unlimited. Staff is limited to 2 members in the free version. Pro removes the staff limit entirely.

= Is this compatible with my theme? =
The booking form uses self-contained CSS and works with any standard WordPress theme. It does not depend on any page builder.

== Screenshots ==

1. Service selection �?categorized services with photos, descriptions, and pricing
2. Date & time picker �?multi-service booking with guest support and real-time availability
3. Full booking view �?step progress bar, service summary, and appointment sidebar
4. Mobile �?service selection on phone
5. Mobile �?calendar and floating cart bar
6. Mobile �?cart drawer showing appointment summary

== External Services ==

This plugin optionally connects to the following third-party services. All connections are **opt-in** and only occur when you explicitly configure and enable the relevant integration in the plugin settings.

= Square Appointments (Optional) =

If you configure Square integration, this plugin communicates with the Square API to:
- Fetch your services, staff, and booking availability from Square
- Create and manage bookings in your Square Appointments calendar
- Sync booking data between your WordPress site and Square

**What data is sent:** Customer name, email, phone number, selected service, staff member, and appointment date/time are sent to Square when a booking is created. Availability queries send service and staff IDs.
**When it is sent:** Only when a visitor submits a booking form, or when the admin triggers a manual sync.
**Service provider:** Square, Inc.
- [Terms of Service](https://squareup.com/us/en/legal/general/ua)
- [Privacy Policy](https://squareup.com/us/en/legal/general/privacy)

= Square Booking Widget (Optional �?Hybrid Mode) =

If you enable "Hybrid Mode" in settings, a JavaScript widget is loaded from Square's servers (`square.site`) to display Square's native booking interface.
**What data is sent:** The visitor's browser connects to Square's CDN to load the widget script. No personal data is sent until the visitor interacts with the widget.
**When it is sent:** Only when a page containing the booking shortcode is loaded and Hybrid Mode is enabled.
**Service provider:** Square, Inc.
- [Terms of Service](https://squareup.com/us/en/legal/general/ua)
- [Privacy Policy](https://squareup.com/us/en/legal/general/privacy)

= Vagaro (Optional) =

If you configure Vagaro integration, this plugin communicates with the Vagaro API to fetch availability and create bookings.
**What data is sent:** Customer name, email, phone, service, and appointment details.
**When it is sent:** Only when a visitor submits a booking form with Vagaro mode enabled.
**Service provider:** Vagaro Inc.
- [Terms of Service](https://www.vagaro.com/pro/terms-of-use)
- [Privacy Policy](https://www.vagaro.com/pro/privacy-policy)

= Google Calendar (Optional) =

If you configure Google Calendar integration, this plugin connects to the Google Calendar API to add booking events to your calendar.
**What data is sent:** Booking details (customer name, service, date/time) are sent to Google.
**When it is sent:** Only when a booking is confirmed and Google Calendar integration is enabled.
**Service provider:** Google LLC
- [Terms of Service](https://policies.google.com/terms)
- [Privacy Policy](https://policies.google.com/privacy)

= Twilio SMS (Optional) =

If you configure Twilio integration, SMS notifications are sent via the Twilio API.
**What data is sent:** Customer phone number and booking details.
**When it is sent:** Only when a booking is confirmed and Twilio SMS is enabled.
**Service provider:** Twilio Inc.
- [Terms of Service](https://www.twilio.com/en-us/legal/tos)
- [Privacy Policy](https://www.twilio.com/en-us/legal/privacy)

**Note:** The free version of this plugin works entirely locally �?no external services are required or contacted unless you explicitly configure an integration in the settings.

== Changelog ==

= 5.2.5 - 2026-05-02 =
* Fixed: Calendar navigation markup and other visible mojibake that could break the date/time step DOM.
* Fixed: Cleaned corrupted visible icons and labels in the booking form, summary, Text Us, and waitlist UI.

= 5.2.4 - 2026-05-02 =
* Fixed: Booking completion page layout after successful checkout, including the success checkmark markup on mobile.
* Improved: Confirmation page content now stays readable and stacked on small screens.

= 5.2.3 - 2026-05-02 =
* Fixed: PHP template parse error that could trigger a WordPress critical error.
* Verification: All PHP files in both Pro and Free packages pass PHP lint.
= 5.2.2 - 2026-05-02 =
* Improved: Mobile bottom bar now shows a shopping-cart icon with a selected-service count badge.
* Improved: Cart entry remains compact while still inviting customers to review selected services.
= 5.2.1 - 2026-05-02 =
* Improved: Removed checkout reassurance cards from the final customer information step.
* Improved: Mobile bottom bar now uses clearer cart language and service counts.
* Fixed: Emptying the cart on the final review step now returns customers to service selection automatically.
= 5.2.0 - 2026-05-02 =
* Fixed: Mobile bottom Confirm Booking now reliably submits the final appointment.
* Improved: The Confirm Booking button now immediately changes to CONFIRMING... while the booking is processing.
* Fixed: Category tabs no longer show the extra outer frame or divider line around the pill buttons.
* Improved: Recent booking UX, dashboard, customer portal, reporting, and service-card accuracy updates are consolidated into this release.

= 5.1.9 - 2026-05-02 =
* Improved: Public booking flow now has a cleaner app-style surface inspired by leading salon booking platforms.
* Improved: Service, staff, option, and time selections now have sharper selected states and calmer spacing.
* Improved: Mobile floating action bar and summary drawer now feel more native and polished.
* Accessibility: Added stronger keyboard focus states across booking controls.

= 5.1.8 - 2026-05-02 =
* Improved: Contact and waitlist forms now include server-side request throttling.
* Improved: Waitlist signup now blocks duplicate active requests for the same service/date by email or normalized phone.
* Improved: Contact messages now store a validated IP and skip notification email unless a valid recipient is configured.
* Security: Booking, waitlist, message, and report CSV exports now protect against spreadsheet formula injection.

= 5.1.6 - 2026-05-02 =
* Improved: Mobile booking now uses one bottom action bar, with the primary Continue button styled green.
* Improved: Immersive booking mode hides more theme header/footer chrome and tightens staff, option, and review screens for a more app-like feel.

= 5.1.5 - 2026-05-02 =
* Fixed: Removed remaining garbled separators from option cards, mobile bottom bar, appointment review cards, and internal booking notes.

= 5.1.4 - 2026-05-02 =
* Fixed: Cleaned garbled symbols in the booking summary, service order buttons, week range, and mobile cart labels.

= 5.1.3 - 2026-05-01 =
* Fixed: Add Guest Together now works again after moving between booking steps.
* Removed: Favorite staff stars from the public staff step.
* Removed: Earliest available shortcut from the time picker for a cleaner layout.

= 5.1.2 - 2026-05-01 =
* Fixed: Add Guest Together now reliably opens service selection from both the add-more prompt and the time-step service banner.
* Added: General setting to limit how many extra guests can be added together in one visit.
* Improved: Guest labels now read "Guest" for the first extra guest and "Guest 2" for the second.

= 5.1.1 - 2026-05-01 =
* Improved: Mobile booking now feels more app-like with a cleaner booking surface and less page clutter.
* Improved: Staff cards are more compact, with clearer selected states and optional favorite staff stars.
* Improved: Time selection now includes an Earliest available shortcut, clearer time groups, and stronger no-time recovery actions.
* Improved: Bottom mobile actions use simpler labels: Continue, Pick a time, and Confirm Booking.
* Added: Confirmation screen now includes Book again alongside manage and calendar actions.

= 5.1.0 - 2026-05-01 =
* Fixed: On mobile, the staff step now opens higher on the page so customers can see the staff choices instead of landing near the footer.
* Fixed: The Back button on the date/time step now returns to staff selection, keeping the selected service, options, and staff ready to adjust.
* Improved: Staff selection keeps the previously chosen staff highlighted when returning from the time step.

= 5.0.7 - 2026-05-01 =
* Fixed: Staff selection now uses preloaded local staff/service assignment data, so it no longer stalls on "Loading staff" after choosing service options.
* Fixed: Week view now starts with today's date so mobile customers do not have to scroll past previous days.
* Fixed: Add Guest Together now treats guests as simultaneous appointments while keeping each guest's own services sequential.
* Fixed: Multi-guest Square availability checks now avoid assigning one staff member to overlapping guest services.
* Fixed: Guest bookings now keep the staff assignment found on the time screen when submitting, preventing false "No staff available" errors.
* Improved: The booking flow now keeps only the date/time search as the real-time Square-dependent step; service options and staff selection are rendered from local synced data first.
* Improved: Mobile cart and appointment duration totals now show the real visit length for guest bookings.
* Improved: Optional guest name and phone fields now appear on checkout when guests are included.

= 5.0.6 - 2026-05-01 =
* Fixed: Add More Service and Add Guest Together now reload service options from preloaded booking data, so second-round service taps no longer wait on slow option AJAX.
* Fixed: Services with main choices such as Fill-in / Full Set must still show their options; the booking flow no longer skips required option selection after an option lookup failure.
* Improved: In-progress multi-service appointments are now saved in session state more reliably.

= 5.0.5 - 2026-05-01 =
* Fixed: Stale or cancelled option/staff/time AJAX callbacks can no longer overwrite the current booking step.
* Improved: If service options fail to load, booking now continues to staff selection instead of stopping with an error.
* Improved: If staff lookup fails, customers can continue with Any staff instead of being blocked.

= 5.0.4 - 2026-05-01 =
* Fixed: Service selection now enters the options screen immediately instead of waiting for the options AJAX request to finish.
* Fixed: Leaving the date/time screen for Add More Service or Add Guest Together now aborts stale options, staff, and availability requests so old lookups cannot block the next service tap.

= 5.0.3 - 2026-05-01 =
* Fixed: Restored the older reliable Add More service flow so returning to Step 1 no longer resets state during the first service tap.
* Fixed: Duplicate-service matching now ignores empty option names, preventing false duplicate blocks.

= 5.0.2 - 2026-05-01 =
* Fixed: Service cards now respond immediately after Add More Service or Add Guest Together on mobile by handling touch selection directly.
* Fixed: Category More dropdown now positions under the tab bar instead of dropping into the service card area.

= 5.0.1 - 2026-05-01 =
* Fixed: Add More Service and Add Guest Together now return to an immediately clickable service list by clearing stale mobile overlays and drawers more aggressively.
* Fixed: Category More menu now opens reliably on mobile with click/touch handling and rebuilds hidden category items before opening.

= 5.0.0 - 2026-05-01 =
* Improved: Mobile cart bar now shows a Continue button when services are already selected, so customers can move to time selection without adding more.
* Improved: Desktop appointment summary also shows Continue when selected services are ready for time selection.
* Improved: Version milestone for the polished booking flow, integrated mobile cart, clearer options, staff continue, and add-more flow cleanup.

= 4.9.10 - 2026-05-01 =
* Fixed: Add More Service and Add Guest Together now return to the service list in a clean, immediately clickable state.
* Fixed: Booking state restore now preserves in-progress multi-service appointments instead of waiting for stale state to clear.
* Improved: Main booking title changed from "Book your appointment" to the cleaner "Book your visit".

= 4.9.9 - 2026-05-01 =
* Fixed: Service detail pricing now summarizes main service options instead of showing an add-on or single variation price.
* Improved: Main service choices now appear above recommended add-ons on the service customization screen.

= 4.9.8 - 2026-05-01 =
* Fixed: Staff selection now includes a clear Continue button after Any staff is selected by default.
* Fixed: Returning from time selection or adding more services no longer leaves stale overlays or selection state that can block service clicks.
* Improved: Staff cards now select a staff member first, then Continue advances to the date and time step.

= 4.9.7 - 2026-05-01 =
* Improved: Mobile booking bottom bar now combines booking summary, cart count, and the main action button.
* Improved: Tapping the mobile summary opens a cleaner bottom cart detail panel above the action bar.
* Improved: Mobile Continue button styling is more consistent with app-style booking flows.

= 4.9.6 - 2026-05-01 =
* Improved: Mobile category tabs now fit better on iPhone screens, including the More tab.
* Fixed: Service option screens now show Back and Continue together in the mobile bottom action bar.
* Improved: Removed the non-clickable Start here badge from the mobile booking header.
* Improved: The final booking form now asks for comments or requests for customer special notes.

= 4.9.5 - 2026-04-30 =
* Improved: Added a unified smart mobile bottom bar across the booking flow.
* Improved: Service options now use the same mobile action bar for Back, selection summary, and Continue.
* Improved: Continue is disabled until the required main option is selected.
* Improved: Reduced duplicate bottom controls and made the phone booking flow feel more app-like.

= 4.8.8 - 2026-04-30 =
* Improved: Added a Fresha-style service detail and related choices screen when a selected service has options.
* Improved: Service options and add-ons now appear as clearer mobile-friendly selection cards.
* Improved: Service option pages now show photos, descriptions, duration, price, and sticky mobile actions.

= 4.8.7 - 2026-04-30 =
* Improved: Refined the booking form, service menu, customer portal, and manage-booking screens with cleaner cards, softer spacing, and more consistent buttons.
* Improved: Improved mobile readability for service cards, category tabs, forms, and time slots.
* Improved: Refined admin screens with cleaner table wrappers, settings cards, form fields, and action buttons.

= 4.8.6 - 2026-04-30 =
* Added: Settings now include a Launch Checklist that checks services, staff, booking page, self-service pages, emails, reminders, and review setup.
* Improved: Setup links now guide non-technical users directly to the next action.
* Improved: Booking/email setup is easier to audit before going live.

= 4.8.5 - 2026-04-30 =
* Added: Reports now include repeat-client count and next-7-days booking count.
* Added: Reports now show upcoming appointments, unpaid follow-ups, and rebooking opportunities for clients who have not returned recently.
* Added: Reports can be exported as a CSV file for monthly review or bookkeeping.

= 4.8.4 - 2026-04-30 =
* Added: Customers can download an Add to Calendar file from the booking success screen when available.
* Added: Confirmation email templates now support {calendar_link}.
* Improved: Add-to-calendar links are protected by the same customer self-service token.

= 4.8.3 - 2026-04-30 =
* Improved: Booking success screen now shows clear self-service links when available.
* Fixed: Reminder and review email scheduling now loads bookings by the correct local booking ID.
* Improved: Reminder templates can include the customer manage-booking link.
* Improved: Customer Portal and Manage Booking settings now explain the recommended setup more clearly.

= 4.8.2 - 2026-04-30 =
* Improved: Booking page service cards now use a cleaner app-style layout with stronger service titles, lighter prices, refined spacing, and softer shadows.
* Added: Services admin now includes search, category filter, and status filter for faster day-to-day management.
* Added: Staff admin now includes search plus status and online visibility filters.
* Added: Bookings admin now includes customer/service/staff search and status filtering.
* Added: Messages admin now includes quick search for customer messages.

= 4.8.1 - 2026-04-30 =
* Improved: Service names are easier to scan with stronger title weight, while prices use a smaller regular-weight style.
* Improved: "Add Guest" is now labeled "Add Guest Together" for clearer group booking.
* Cleaned: Removed developer-facing service diagnostics and placeholder edit alerts from the Services admin page.

= 4.8.0 - 2026-04-30 =
* Added: Services and Staff admin pages now support selecting multiple rows and deleting them in one action.
* Added: Services can now store an uploaded image for a prettier booking page and service menu.
* Improved: Active booking category tabs now use a black filled pill style for clearer mobile navigation.
* Improved: Category order and display name settings are consolidated under Brand & Colors.
* Improved: Yatoon PWA is now optional and off by default, making it easier to use alongside site-wide PWA plugins such as SuperPWA.
* Fixed: Category order saving now works reliably from Brand & Colors.

= 4.5.13 - 2026-04-28 =
* Added: Customer package assignments with visit balances, expiration dates, and automatic visit redemption during booking.
* Added: Customer membership assignments with active date ranges and automatic booking discounts.
* Added: Growth redemption records for package visits and membership discounts.
* Improved: Coupons now stack after membership discounts and fixed coupons apply only once in multi-service bookings.
* Improved: Growth Modules admin now lists customer package and membership balances.

= 4.5.12 - 2026-04-28 =
* Added: Growth Modules admin page with switches for coupons, packages, and memberships.
* Added: Coupon code support in the booking form when coupons are enabled.
* Added: Starter translation files for Simplified Chinese, Vietnamese, and Spanish.
* Fixed: Freemius initialization is deferred until plugins_loaded to avoid activation sandbox failures.
* Fixed: Pro compatibility helper yatoon_is_pro() is available for shared feature checks.
* Fixed: Staff limit handling now fails with a clear message when Pro licensing is inactive.
* Fixed: Local booking total calculation now initializes the WordPress database object before deposit/coupon logic.
* Cleaned: Removed mojibake/encoding artifacts from plugin-owned documentation and source files.

= 4.5.11 - 2026-04-28 =
* Fixed: Critical error on booking page �?category order option returned array instead of string causing explode() fatal error.

= 4.5.10 - 2026-04-28 =
* Fixed: Save Platform and Save Settings now use AJAX �?no more redirect issues on any server.
* Fixed: Platform selection (Square/Local/Vagaro) now saves and reloads correctly.

= 4.5.9 - 2026-04-28 =
* Fixed: Save Settings now correctly redirects back to plugin page with success notice in all environments.
* Improved: Added Save button directly inside the Booking Platform card for convenience.

= 4.5.8 - 2026-04-28 =
* Fixed: Save Settings now redirects back to plugin page with a success notice.
* Fixed: Sync Now button no longer shows "Network error" �?PHP execution time extended and fatal errors now caught properly.
* Fixed: Sync log corruption that caused repeated sync failures after first run.
* Fixed: Square API request timeout increased from 5s to 30s for reliability.
* Fixed: Rebuild Service Assignments button restored to Staff page; now assigns all services as fallback when Square has no profile data configured.
* Fixed: "Powered by Yatoon" footer hidden for Pro license holders.
* Improved: Square API configuration section locked/greyed out for users without an active Pro license.
* Improved: Sync Settings moved inside the Square API Configuration card for clearer layout.

= 4.5.1 - 2026-04-27 =
* Fixed: More reliable first-time activation, database updates, local booking setup, and waitlist background checks.
* Fixed: Improved admin menu and license-screen compatibility in local development environments.

= 4.5.0 - 2026-04-27 =
* Added: PWA (Progressive Web App) support �?customers can install the booking page to their phone home screen directly from the browser, no App Store required
* Added: Merchant admin PWA �?salon owners can install the Yatoon admin dashboard to their phone home screen for quick one-tap access
* Added: Push notifications for new bookings �?instant phone alert when a customer books (requires installing the admin PWA and granting notification permission)
* Added: Web App Manifest for both customer booking side and merchant admin side
* Added: Service Worker with cache-first strategy for static assets, improving booking page load speed on repeat visits
* Added: PWA icons (192×192 and 512×512) auto-generated from your business logo
* Added: iOS and Android installability meta tags
* Added: REST API endpoints for push subscription management

= 4.0.2 - 2026-04-26 =
* Added: Empty installs now seed starter data so the booking flow can be tested immediately
* Added: Admin setup notice with quick links to Services, Staff, and Settings
* Added: Staff profiles now support local manual blocked periods / time-off rules
* Fixed: Booking and customer reschedule flows now exclude blocked staff periods
* Fixed: Local-only booking overlap checks now use the correct site timezone
* Fixed: Documentation now reflects the current `[yatoon_booking]` shortcode and local setup flow

= 4.0.1 - 2026-04-24 =

* Fixed staff creation so additional manual staff members no longer fail due to external ID collisions.
* Manual staff creation now writes a unique local external ID consistently across different staff table schemas.

= 4.0.0 - 2026-04-24 =

* Staff management is now unified into a single Staff page.
* Pro Staff page now includes full add/edit/delete staff management alongside service assignment controls.
* Pro supports unlimited staff members.
* Square-only staff actions are hidden unless the active platform is Square.

= 3.9.0 - 2026-04-24 =

* Security hardening: deposit/payment amounts are now validated server-side, Stripe webhook signature handling was tightened, and Google OAuth callbacks now require a validated `state`.
* Booking flow fixes: local "Any staff" validation now checks the actual assigned staff member, booking manager accepts both `token` and `yatoon_token`, and customer-facing times display correctly.
* Customer portal fixes: local mode no longer depends on Square customer search, OTP/session flow is more reliable, and cancel/reschedule actions behave correctly.
* Pro/admin fixes: Freemius gating now correctly requires an active license for Pro pages, direct URL access to gated pages is blocked, and Bookings payment/status UX was improved.
* Mobile/admin usability improved across Clients, Staff, Services, Waitlist, Messages, Sync Log, and Service Menu tables.

= 3.8.1 - 2026-04-23 =
* Fixed: Service Menu page showing old [sbs_service_menu] shortcode name
* Fixed: Add Service modal stuck on Saving due to sbs_add_option AJAX hook mismatch
* Fixed: Missing is_featured column in yatoon_services table
* Improved: Save Settings button now appears next to Test Square Connection

= 3.8.0 - 2026-04-23 =
* Added: [yatoon_service_menu] shortcode �?categorized filterable service/price list on any page
* Added: Featured service toggle �?pin services to a Featured tab on the menu
* Added: Category ordering �?drag-reorder categories from the Service Menu admin page
* Added: Menu Page URL setting �?Book Now buttons link to your booking page
* Changed: All shortcodes unified to yatoon_ prefix ([yatoon_booking], [yatoon_service_menu], [yatoon_customer_portal], [yatoon_manage_booking])
* Changed: All wp_options keys unified to yatoon_ prefix
* Changed: All AJAX hooks unified to yatoon_ prefix
* Fixed: Business Hours / Max Guests settings save silently failing
* Fixed: Frontend booking clicks had no effect due to AJAX name mismatch



= 3.6.2 =
* New: Staff Calendar admin page with daily staff columns and booking cards
* New: Booking operational statuses: pending, confirmed, completed, no-show, cancelled
* New: Payment status tracking designed for Square POS in-store checkout
* New: Admin can mark bookings as unpaid, paid in Square POS, deposit paid, refunded, or waived
* New: Optional cancellation / no-show policy acknowledgement with saved booking snapshot
* New: Optional consent / waiver signature with saved booking snapshot
* New: Service-level rules can require policy acknowledgement or consent signature only for selected services
* New: Service-level setting to hide staff choice and use Any Staff assignment
* New: Service-level scheduling fields for buffer before, buffer after, and minimum lead time
* New: Client CRM preferences field for service notes, favorite colors, likes/dislikes, and visit preferences
* Improved: Client profile modal now shows booking count, lifetime value, no-show count, and unpaid count
* Improved: Client booking history now includes payment status
* New: Waitlist automation checks active waitlist requests and emails customers when a matching opening appears
* New: Waitlist page includes a manual "Check Openings Now" action and notified/matched opening status
* New: Reports page with booking, revenue, no-show, unpaid, top service, and staff performance metrics
* Improved: Success message clarifies that payment is collected through Square POS at the salon
* Fixed: Plugin version constant now matches the public plugin version
* Fixed: Worker secret is no longer hardcoded in the plugin file
* Fixed: Undefined timezone variable in local availability lookup
* Fixed: Settings page category order section now correctly loads `$wpdb` before querying categories

= 3.0.1 =
* New: 👤 Clients page �?client profiles are automatically created on every new booking
* New: Admin can add per-client notes, allergies/sensitivities, preferred staff, and tags
* New: Client profile modal shows full booking history (date, service, staff, status, price)
* New: Client list shows visit count, last visit date, total spent �?searchable and paginated

= 2.97 =
* Improvement: Unified all internal naming �?Pro version now uses the same YATOON_ class prefix, yatoon_ option names, and yatoon_ DB table names as the Free version (previously used SBS_ / sbs_)
* Migration: Automatic data migration on upgrade �?existing sbs_* database tables are renamed to yatoon_* and all sbs_* WordPress options are copied to yatoon_* transparently
* No action required from existing users �?all settings, bookings, and data are preserved automatically

= 2.96 =
* New: Email Notifications page (🔔 Notifications in admin menu) with 4 configurable email types
* New: Appointment Reminder email �?sent X hours before appointment (configurable), with editable subject and body, supports template variables
* New: Review Request email �?sent X hours after appointment ends, includes a Google Review button (configurable link), with editable subject and body
* New: Cancellation Notification email �?sent when an appointment is cancelled, with editable subject and body
* New: Reschedule Notification email �?sent when an appointment is rescheduled, with editable subject and body
* New: All 4 notification types include a "Send Test Email to Admin" button for previewing
* New: Admin Bookings page �?Cancel button now shows a confirmation modal with "Notify customer by email" checkbox (checked by default)
* New: Customer Portal �?Cancel action now shows a confirmation modal with "Send me a confirmation email" checkbox
* New: Customer Portal �?Reschedule modal now includes a "Send me a confirmation email" checkbox
* Fixed: Auto Sync cron was not rescheduling when interval changed �?hook was listening to wrong option name
* Fixed: Changing sync interval while Auto Sync is disabled no longer creates a phantom cron job
* Fixed: Invalid interval values are now validated before being passed to wp_schedule_event

= 1.1.3 =
* Fixed: Replaced all $table_xxx variables in SQL queries with {$wpdb->prefix}tablename directly (resolves InterpolatedNotPrepared + UnescapedDBParameter)
* Fixed: All date() calls replaced with gmdate() (25 instances)
* Fixed: strip_tags() replaced with wp_strip_all_tags()
* Fixed: Added phpcs:disable/enable to all view files for NonPrefixedVariableFound
* Fixed: Added nonce verification to ajax_get_staff_services and ajax_update_staff_services
* Fixed: ExceptionNotEscaped in cron.php �?exceptions are logged, not echoed to users
* Fixed: NonPrefixedFunctionFound �?sbs_resolve_font renamed to yatoon_resolve_font
* Fixed: MissingTranslatorsComment �?added translators comments throughout
* Fixed: EscapeOutput remaining instances in admin views

= 1.1.2 =
* Compliance: Renamed all plugin prefixes from ybs_/sbs_ to yatoon_ (�? chars) per WP.org guidelines
* Compliance: Renamed all class names from SBS_* to YATOON_*
* Compliance: Added == External Services == documentation to readme.txt
* Security: Replaced all _e() with esc_html_e() for proper escaping (68 instances)
* Security: Added nonce verification to Google OAuth callback (state parameter)
* Security: Replaced remaining stripslashes() with wp_unslash()
* Security: Added sanitize_text_field() to $_SESSION reads
* Security: Added wp_unslash() to all JSON POST data reads
* i18n: Added missing text domain to __() calls in activator.php
* i18n: Fixed shortcode names to yatoon_booking and yatoon_customer_portal
* Compatibility: Updated Tested up to WordPress 6.8

= 1.1.1 =
* Security: Added direct file access protection (ABSPATH check) to all PHP files
* Security: Added nonce verification to sync_bookings_from_square, debug_square_availability, debug_date_bookings handlers
* Security: Replaced wp_redirect() with wp_safe_redirect() throughout
* Security: Added wp_unslash() to all sanitize calls for POST/GET input
* Security: Escaped all unescaped output in admin and public views
* Security: Sanitized $_SERVER['REMOTE_ADDR'] via sanitize_text_field()
* Compatibility: Removed unnecessary load_plugin_textdomain() call (not needed for WP 6.0+)
* i18n: Fixed text domain �?unified all strings to 'yatoon-booking-system'
* i18n: Fixed admin page slug URL references
* Tested up to WordPress 6.8

= 1.1.0 =
* Initial public release on WordPress.org
