=== Availo ===
Contributors: darshandagli
Tags: appointments, booking, scheduling, calendar, meetings
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Appointment scheduling for WordPress — event types, availability schedules, and a clean booking flow with email confirmations.

== Description ==

Availo lets visitors book meetings with you directly on your WordPress site.

* **Event types** — define meetings like "30-min Intro Call" with duration, location, buffers, minimum notice, rolling booking window, and a daily cap.
* **Availability schedules** — weekly working hours per host with date-specific overrides, all timezone- and DST-aware.
* **Booking flow** — a fast, responsive three-pane widget: pick a day, pick a time (shown in the invitee's own time zone), enter details, done.
* **Custom questions** — collect extra information from invitees at booking time.
* **Email notifications** — confirmation, cancellation, and reschedule emails with calendar (.ics) attachments for both invitee and host.
* **Self-service changes** — invitees cancel or reschedule via a secure tokenized link. No account needed.
* **Embed anywhere** — Gutenberg block, `[availo]` shortcode (inline or popup button), or auto-generated booking pages at `/schedule/{host}/{event}/`.
* **Bookings dashboard** — filterable admin list of all bookings with one-click cancellation.

Availo stores all data in your own WordPress database. No external services, no accounts, no tracking.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/availo`, or install through the WordPress plugins screen.
2. Activate the plugin.
3. Go to **Availo → Availability** to set your working hours.
4. Create your first event type under **Availo → Event Types**.
5. Share the booking link, or embed the booking block/shortcode on any page.

== Frequently Asked Questions ==

= Does it detect the visitor's time zone? =

Yes. Slots are displayed in the invitee's local time zone (detected from the browser), with a manual override selector.

= Can invitees cancel or reschedule? =

Yes. Every confirmation email includes a secure manage link where the invitee can cancel or pick a new time.

= Does it prevent double bookings? =

Yes. Slot availability is re-validated inside a per-host lock at the moment of booking, so two invitees can never win the same slot.

= Will my data be removed if I uninstall? =

Only if you explicitly enable "Delete all data on uninstall" in Settings. By default your bookings are kept.

= Does it work with Elementor, Divi, WPBakery, Bricks, and other page builders? =

Yes. Use the `[availo event="your-event"]` shortcode in any builder's shortcode/text/code element, or the Availo block in the block editor. The widget also mounts inside content a builder injects dynamically (popups, tabs, accordions), and its styles are isolated from theme and builder CSS. Developers can trigger a manual re-scan with `window.Availo.scan()`.

= Does it work with block themes and classic themes? =

Yes. The booking pages at `/schedule/{host}/{event}/` render inside your active theme — block themes (e.g. Twenty Twenty-Five) and classic themes are both supported, and the widget works with pretty or plain permalinks.

= Can I customize the thank-you screen or redirect after booking? =

Per event type you can edit the thank-you message, fully customize the confirmation email (subject and body with merge tags), or redirect invitees to any URL right after booking.

== Screenshots ==

1. Booking widget — invitees pick a day and time in their own time zone
2. Booking form with your custom questions
3. Thank-you screen — per event, show a custom message or redirect to any page
4. Bookings dashboard with status and event filters
5. Booking detail — everything the invitee submitted, in one place
6. Availability editor — weekly hours and date overrides per host
7. Event type scheduling settings — duration, buffers, notice, booking window
8. After-booking options — thank-you message, redirect, and confirmation email editor

== Changelog ==

= 1.0.0 =
* First public release.
* Appointment scheduling: unlimited event types, availability schedules with date overrides, buffers, minimum notice, booking windows, daily caps, and automatic time zone / daylight-saving handling.
* Booking widget with double-booking prevention, embeddable via block, `[availo]` shortcode, popup button, or automatic booking pages; works with classic themes, block themes, and page builders (Elementor, Divi, WPBakery, Bricks).
* Email confirmations with .ics calendar invites, reminder emails, custom per-event confirmation emails with merge tags, and invitee self-service cancel & reschedule.
* Custom booking questions, per-event thank-you message or redirect.
* Bookings dashboard, month calendar view, booking detail view, manual bookings, and CSV export.
* "Availo Host" role for teams, plus GDPR export and erase tools.

= 0.7.0 =
* Dev: manual admin bookings now run the `availo_booking_data` filter (source "admin"), so add-ons like conferencing integrations apply to them too.

= 0.6.0 =
* Improvement: everywhere a booking's host is shown or notified (emails, calendar invites, bookings list, detail view, CSV export), the booking's assigned host is used — supports team/round-robin add-ons where the assigned host differs from the event owner.
* Dev: the `availo_available_slots` filter now receives the range, timezone, and reference time, enabling multi-host availability extensions.

= 0.5.0 =
* New: full support for pending bookings (approval workflows) — a "request received" email without a premature calendar invite, the real confirmation with .ics on approval, pending in the bookings list and filters, invitee cancel/reschedule of pending requests, and a "Request received" screen in the booking widget.
* Dev: new extension points for add-ons — `availo_booking_data` filter (modify a booking before insert), `availo_booking_row_actions` filter (add admin list actions), `availo_booking_approved` action (sends the confirmation email).

= 0.4.0 =
* New: booking calendar — a month view of all bookings in wp-admin, color-coded by event type.
* New: manual bookings — create a booking for an invitee from the admin, with an optional availability override and optional confirmation email.
* New: CSV export of bookings (respects the current status/event filters) including custom question answers.
* New: "Availo Host" role — team members can manage their own event types, availability, and bookings without seeing other hosts' data or the rest of wp-admin.
* Improvement: all plugin screens now use dedicated capabilities instead of requiring administrator access.

= 0.3.0 =
* New: reminder email to the invitee before the meeting (configurable hours in Settings, 0 disables; scheduled per booking, cleared on cancel/reschedule).
* New: GDPR integration — bookings and question answers appear in WordPress's Export Personal Data tool, and Erase Personal Data anonymizes the invitee (name, email, answers, manage token) while keeping the slot history intact.
* New: full translation template (`languages/availo.pot`) and block editor script translations.
* Fix: browser timezone aliases (e.g. "Asia/Calcutta", reported by Chrome for Indian visitors) are now accepted instead of silently falling back to site time.
* Fix: time-slot buttons no longer get squashed when a day has many slots; the times list scrolls instead.
* Fix: the widget keeps a sane maximum width inside full-width theme and page-builder containers.
* Dev: `.distignore` so tests and docs never ship in the distribution zip.

= 0.2.0 =
* New: booking detail view in the admin showing everything the invitee submitted.
* New: per-event thank-you message and fully editable confirmation email (subject + body with merge tags, including a manage-booking link).
* New: per-event choice between showing a thank-you message or redirecting to a URL after booking.
* Compatibility: widgets now mount inside content injected by page builders (Elementor, Divi, WPBakery, Bricks) after page load; added `window.Availo.scan()`.
* Compatibility: widget CSS is isolated against theme/builder button and input styles; added fallbacks for older browsers (color-mix, inset, aspect-ratio).
* Compatibility: booking REST calls now work with plain permalinks; booking pages send correct 200 status and a meaningful page title.
* Fix: booking widget no longer sends a nonce that could expire on cached pages and block bookings with a 403.
* Fix: a submit error no longer clears everything the invitee typed.
* Fix: popup embed restores page scroll and Escape/backdrop handling reliably; a drag ending on the backdrop no longer closes an in-progress booking.
* Fix: failed cancellations now show an error instead of failing silently.
* Fix: time slots follow the timezone actually used by the server; month navigation is timezone-accurate around month boundaries.

= 0.1.0 =
* Initial release: event types, availability schedules with overrides, timezone-aware slot engine, booking widget (block, shortcode, booking pages), email notifications with ICS attachments, invitee cancel/reschedule, bookings dashboard.

== Upgrade Notice ==

= 1.0.0 =
First public release of Availo.

= 0.2.0 =
Compatibility release: page builders, block themes, plain permalinks, cached pages. Plus editable confirmation emails and post-booking redirects.

= 0.1.0 =
Initial release.
