=== Boseat Booking === Contributors: boseat Tags: booking, reservation, widget, shortcode, embed Requires at least: 5.2 Tested up to: 6.7 Stable tag: 1.0.1 Requires PHP: 7.2 License: GPL v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Easily embed the Boseat reservation widget into your WordPress site via a simple shortcode. == Description == The **Boseat Booking** plugin allows you to easily embed the **Boseat reservation widget** into your WordPress site. You can display it as a **modal**, **inline element**, **floating button**, or **direct iframe**. **Key Features:** * Easy integration with the `[boseat]` shortcode * 4 display modes: `modal`, `inline`, `float`, `direct` * Customizable parameters (tenant, workspace, seat, etc.) * JavaScript event support for developers * Avoid cookie-related redirect issues with direct iframe mode * Test mode support for development environments **Basic shortcode:** `[boseat]` **With custom parameters:** `[boseat tenant="boseat" workspace="test" seat="test" button_text="Book now" display="modal"]` **Direct iframe mode (bypasses JS widget, avoids cookie/redirect issues):** `[boseat display="direct" width="100%" height="600px"]` == Installation == 1. Upload the plugin files to `/wp-content/plugins/boseat-booking`, or install the plugin through the WordPress plugins screen directly. 2. Activate the plugin through the **Plugins** screen in WordPress. 3. Go to **Settings > Boseat Booking** to configure your default tenant, workspace and seat identifiers. 4. Use the `[boseat]` shortcode on any page or post. == Frequently Asked Questions == = What are the required shortcode parameters? = `tenant`, `workspace`, and `seat` are required. You can set default values in **Settings > Boseat Booking** so you don't need to specify them in every shortcode. = What display modes are available? = * `modal` – A button that opens a booking modal (default) * `inline` – Widget embedded directly in the page * `float` – Floating button pinned to the bottom right of the page * `direct` – Direct iframe, bypasses the JS widget (useful for cookie or redirect issues) = How do I fix redirection issues? = 1. Use `display="direct"` in your shortcode, or enable **"Use direct iframe"** in Settings > Boseat Booking. 2. Clear cookies related to `app.boseat.com`. 3. Ensure your site uses **HTTPS**. 4. Try in a private/incognito window. = How can I listen to reservation events? = You can add custom JavaScript event listeners: `document.addEventListener('boseat:booking-success', function(e) { console.log(e.detail.bookingId); });` Available events: `boseat:booking-success`, `boseat:booking-cancel`, `boseat:modal-open`, `boseat:modal-close`. = How do I use test mode? = Add `mode="test"` to the shortcode: `[boseat mode="test"]`, or set the default mode in Settings > Boseat Booking. == Shortcode Parameters == * `tenant` – Tenant identifier * `workspace` – Workspace identifier * `seat` – Seat identifier * `button_text` – Button label (localized default if omitted) * `display` – Display mode: `modal`, `inline`, `float` or `direct` (default: `modal`) * `width` – Widget width in inline or direct mode (default: `100%`) * `height` – Widget height in inline or direct mode (default: `500px`) * `mode` – Execution mode: `live` or `test` (default: `live`) * `use_direct_iframe` – Force direct iframe mode: `"true"`/`"1"` (default: `false`) == Screenshots == 1. Plugin settings page — configure default tenant, workspace, seat and display mode. 2. Modal display mode — a button opens the booking widget in a popup. 3. Inline display mode — the booking widget is embedded directly in the page. 4. Float display mode — a floating button fixed to the bottom right corner. == Changelog == = 1.0.1 = * Updated `Tested up to` to WordPress 6.7 * Added `readme.txt` for WordPress.org plugin directory compatibility = 1.0.0 = * Initial release * `[boseat]` shortcode with `modal`, `inline`, `float` and `direct` display modes * Settings page under Settings > Boseat Booking * JavaScript event dispatching for booking lifecycle hooks * Direct iframe fallback mode for cookie/redirect issues == Upgrade Notice == = 1.0.1 = Maintenance release: WordPress 6.7 compatibility confirmed, no functional changes.