=== BookMyAppointments – Booking Form ===
Contributors: alticllc
Tags: booking, appointments, scheduling, calendar, embed
Requires at least: 5.8
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

Embed your BookMyAppointments booking form on any WordPress page. Works with Gutenberg, Elementor, Divi, and all page builders.

== Description ==

**BookMyAppointments** lets your customers book appointments directly from your WordPress website. Connect your BookMyAppointments account and embed the booking form anywhere on your site.

= Features =

* **One-click connect** — Link your BookMyAppointments account with a single click
* **Shortcode** — Use `[bookmyappointments]` in any page, post, or widget
* **Gutenberg block** — Native block editor support with live preview
* **Elementor widget** — Drag-and-drop widget for Elementor
* **Divi compatible** — Works out of the box with Divi's text and code modules
* **Responsive** — Automatically resizes to fit any screen
* **Google Tag Manager** — Optional GTM integration for conversion tracking
* **Lightweight** — No bloat, loads only on pages where the form is used

= How It Works =

1. Install and activate the plugin
2. Go to **BookMyAppointments** in your WordPress admin menu
3. Click **Connect BookMyAppointments** to link your account (or create a free account)
4. Add the booking form to any page using the shortcode, Gutenberg block, or Elementor widget
5. Your customers can now book appointments directly from your website

= Shortcode =

Basic usage:
`[bookmyappointments]`

With custom options:
`[bookmyappointments height="600" view="full"]`

= Shortcode Attributes =

* `slug` — Your business slug (uses default from settings if not specified)
* `height` — Form height in pixels (default: 800)
* `view` — Display mode: "form" (form only) or "full" (with business card) (default: form)
* `gtm_id` — Google Tag Manager container ID (optional)

== Installation ==

1. Upload the `bookmyappointments` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Go to **BookMyAppointments** in your admin menu
4. Click **Connect BookMyAppointments** to link your account
5. Add the booking form to any page

== Frequently Asked Questions ==

= Do I need a BookMyAppointments account? =

Yes. You can create a free account at [app.bookmyappointments.com](https://app.bookmyappointments.com).

= Does it work with my page builder? =

Yes! The plugin works with Gutenberg, Elementor, Divi, WPBakery, Beaver Builder, and any page builder that supports WordPress shortcodes.

= Can I embed multiple booking forms on one site? =

Yes. Use the `slug` attribute to specify different business slugs:
`[bookmyappointments slug="location-a"]`
`[bookmyappointments slug="location-b"]`

= Does the plugin slow down my site? =

No. The embed script loads asynchronously and only on pages where the booking form is used.

== External services ==

This plugin relies on the BookMyAppointments service (operated by Altic LLC, the publisher of this plugin) to render the booking form and manage appointments.

**Booking form embed script**

On pages where the booking form is used (via the shortcode, Gutenberg block, or Elementor widget) — and on the plugin's admin settings page preview — the plugin loads an embed script from `https://go.bookmyappointments.com/embed-gtm.min.js`. This script is needed to display the booking form. When it loads, the site visitor's browser sends standard web request data (IP address, browser user agent, and the URL of the page) to go.bookmyappointments.com, together with the configured business slug, the selected view mode, and (if configured) your Google Tag Manager container ID. When a visitor books an appointment, the information they enter in the form (such as their name, contact details, and chosen appointment time) is sent to and processed by the BookMyAppointments service.

**Account connection**

When you click "Connect BookMyAppointments" on the plugin settings page, your browser is taken to `https://app.bookmyappointments.com` to sign in to your BookMyAppointments account. After you approve the connection, your business slug is sent back to your site's admin callback URL. No data from your WordPress site is sent during this step other than the callback URL itself.

This service is provided by BookMyAppointments: [Terms of Service](https://bookmyappointments.com/terms), [Privacy Policy](https://bookmyappointments.com/privacy).

== Screenshots ==

1. Plugin settings page — connect your account
2. Booking form embedded on a page
3. Gutenberg block in the editor
4. Elementor widget configuration

== Changelog ==

= 1.0.0 =
* Initial release
* Shortcode support
* Gutenberg block
* Elementor widget
* One-click account connection
* Google Tag Manager integration
