=== DevAgent WBR — Rentals and Bookings for WooCommerce ===
Contributors: devagent
Tags: woocommerce, booking, rental, woocommerce booking, rental booking
Requires at least: 6.8
Tested up to: 7.1
Requires PHP: 8.1
Requires Plugins: woocommerce
WC requires at least: 8.5
WC tested up to: 11.1.2
Stable tag: 1.2.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn WooCommerce products into full-day rentals and bookings with date-range availability, daily capacity and calendar management.

== Description ==

DevAgent WBR is a WooCommerce rental and booking plugin for full-day and overnight reservations. Turn simple or variable products into bookable products with date-range availability, daily capacity, remaining availability and an admin booking calendar.

The plugin is designed for stores that need full-day date range bookings, availability checks, capacity per day and clear frontend date selection.

More information is available on the [DevAgent WBR website](https://devagent.es/devagent-wbr/).

= Main features =

* Simple booking and Variable booking product types.
* Day mode and night mode.
* Capacity per day with remaining availability display.
* Calendar / Bookings admin screen based on WooCommerce orders.
* Inline full-day blocks and per-day capacity overrides.
* Frontend Air Datepicker calendar with disabled unavailable dates.
* Quantity selector control for booking products.
* WooCommerce cart, checkout, order admin and email booking metadata.
* HPOS-safe order access through WooCommerce APIs.
* Translation-ready strings using the `devagent-wbr-rentals-bookings` text domain.
* Public extension contracts, hooks and registry surfaces for compatible add-ons.

= Ideal for =

* Bike and scooter rentals.
* Tool and equipment rentals.
* Event and party equipment.
* Sports and outdoor equipment.
* Any WooCommerce product rented by full days or nights.

= Video tutorials =

Learn DevAgent WBR Base step by step with the official nine-part video series, from installation and booking-product configuration to availability, the booking workflow and calendar management.

[Watch the complete 9-video playlist](https://www.youtube.com/playlist?list=PLASiL2XAuWRU)

https://www.youtube.com/watch?v=dhtdLT9qekY

All episodes:

* [Part 1 — Install DevAgent WBR](https://youtu.be/dhtdLT9qekY)
* [Part 2 — First Simple Booking](https://youtu.be/xkruv8Z5R9w)
* [Part 3 — Variable Booking Products](https://youtu.be/ZNfMsf2Bn1U)
* [Part 4 — Day vs Night Bookings](https://youtu.be/M2isO1CpIwQ)
* [Part 5 — Availability & Capacity](https://youtu.be/ZsSmjSuKIX0)
* [Part 6 — Booking Flow](https://youtu.be/HjFLfz_FPzI)
* [Part 7 — Orders & Emails](https://youtu.be/JjuTB2P2x1w)
* [Part 8 — Calendar & Bookings](https://youtu.be/LgJoqZGdiJ0)
* [Part 9 — Limits & Next Tools](https://youtu.be/e0zRAF-8rgQ)

You can also open **DevAgent WBR > Settings > Video Tutorials** after installation to browse the episodes using thumbnail links. Videos open on YouTube; they are not embedded in the WordPress admin.

= Third-party assets =

DevAgent WBR includes Air Datepicker 3.6.0 locally under `vendor/air-datepicker/` for the frontend booking calendar. Air Datepicker is MIT licensed and dependency-free. Source and license details are documented in `vendor/air-datepicker/SOURCE.txt` and `vendor/air-datepicker/LICENSE.txt`.

= What the free plugin does not include =

* Hourly bookings.
* Advanced pricing rules.
* Operational logs.
* Custom booking tables.
* Buffer days.

== Installation ==

1. Upload the `devagent-wbr-rentals-bookings` folder to `/wp-content/plugins/` or install the plugin ZIP from WordPress admin.
2. Activate the plugin from **Plugins**.
3. Make sure WooCommerce is installed and active.
4. Go to **DevAgent WBR > Settings** and review the global booking settings.
5. Edit a WooCommerce product and select **Simple booking** or **Variable booking** as the product type.
6. For products using the **Variable booking** type, configure booking capacity inside each variation.
7. Use **DevAgent WBR > Calendar / Bookings** to review availability and manage full-day blocks or capacity overrides.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. DevAgent WBR extends WooCommerce products, cart, checkout and orders.

= Does this plugin create a booking custom post type? =

No. Bookings are derived from WooCommerce order line item metadata.

= Is it compatible with HPOS? =

Yes. The plugin declares compatibility with WooCommerce High-Performance Order Storage (HPOS) and uses WooCommerce APIs for order access.

= Can customers book more than one item? =

Yes, when **Show quantity selector** is enabled and the selected date range has enough remaining capacity.

= Where are blackouts managed? =

Blackouts and per-day capacity overrides are managed from **DevAgent WBR > Calendar / Bookings**.

= Are buffers supported? =

No. Buffer fields were intentionally removed from this plugin to keep the booking flow simple.

= What happens when I uninstall DevAgent WBR? =

By default, DevAgent WBR keeps its settings and product booking rules so you can reinstall without losing configuration. You can choose to delete DevAgent WBR plugin data from **DevAgent WBR > Settings > General > Uninstall behavior** before deleting the plugin. WooCommerce orders, sales data and order item booking details are preserved.

== Screenshots ==

1. Booking date picker on a WooCommerce product page.
2. Calendar / Bookings admin availability view.
3. Simple booking and Variable booking product types.

== Changelog ==

= 1.2.7 =
* Calendar / Bookings distinguishes Hourly per-slot availability from Base Date Range daily remaining and hides day-capacity controls when Hourly mode is selected. Existing Date Range behavior is preserved; no data migration is required.

= 1.2.6 =
* Adds a read-only Video Tutorials tab under Settings with a nine-episode guide, official playlist and direct YouTube links.
* Adds locally packaged tutorial thumbnail support and a branded text fallback when thumbnail files are unavailable.
* Adds the complete tutorial series to the WordPress.org description and updates version-aware release packaging.
* Preserves existing booking settings, checkout behavior, order data, availability and public add-on contracts; no migration required.

= 1.2.5 =
* Corrects the Calendar / Bookings monthly table alignment so Reasons, Bookings and Day rules each appear under the correct heading.
* Shows readable availability reasons such as past dates, full blocks, capacity overrides and insufficient capacity.
* Confirms compatibility with WordPress 7.1.3. Minimum WordPress, PHP and WooCommerce requirements remain unchanged.
* No changes to booking data, pricing, checkout validation or extension contracts; no data migration required.

= 1.2.4 =
* Highlights only actually selected booking dates; hover-previewed endpoints no longer retain selected borders.
* Fills the days between confirmed range endpoints with a pale blue background, including across month boundaries.
* Enforces minimum booking days or nights in the frontend, WooCommerce add-to-cart and classic/Store API checkout validation.
* Makes an empty Minimum units field on a Simple booking product inherit the global minimum again.
* Maintains booking-mode and add-on extension contracts, existing metadata, and installed booking functionality; no data migration.

= 1.2.3 =
* Fixes date-range calendar initialization when WordPress does not emit the localized frontend configuration during single-product block-theme rendering.
* Adds a per-booking-surface configuration fallback while preserving the public `window.devawbrentbkBooking` contract.
* Makes frontend initialization safe when the script runs after `DOMContentLoaded`.
* Preserves existing booking modes, availability REST, pricing hooks, cart/session keys, checkout validation and order persistence.
* No data migration is required.

= 1.2.2 =
* Validated runtime compatibility with WordPress 7.1.2 and WooCommerce 11.1.2 while retaining the existing minimum requirements.
* Normalized the codebase against the DEVAGENT compatibility-safe WordPress Coding Standards profile without changing booking behavior or public contracts.
* Preserved existing namespaced camelCase APIs, callback signatures, autoload paths, hooks, options, metadata and extension identifiers for backward compatibility.
* Normalized uninstall formatting and array syntax without changing cleanup scope or data-retention behavior.
* Precomputed loop bounds in calendar and booking-date helpers and explicitly marked required unused callback parameters.
* No data migration is required.

= 1.2.1 =
* Packaging fix: restores booking-mode files missing from the WordPress.org distribution.
* No functional changes.

= 1.2.0 =
* Added a neutral booking-mode architecture with `date_range` registered by the core and extension contracts for future custom temporal modes.
* Added safe mode resolution for products and variations, including persistent mode assignment so unavailable add-ons never fall back silently to daily bookings.
* Added mode-specific frontend rendering, request validation, cart/session handling, checkout revalidation, pricing, presentation and order persistence.
* Kept the existing `date_range` markup, day/night units, availability REST contract and legacy extension hooks compatible with previous releases.
* Isolated custom booking-mode payloads and pricing so DevAgent WBR — Dynamic Pricing continues to process date-range bookings only.
* Added the neutral `devawbrentbk_booking_context_changed` JavaScript event while preserving `devawbrentbk_booking_selection_changed`.
* Added neutral Calendar / Bookings extension hooks for per-day data and additional day-row output.
* Added DevAgent WBR — Hourly Bookings & Appointments to the Available add-ons catalog with slug-based Installed / Available exclusion.
* Added a dedicated local icon asset for the Hourly Bookings & Appointments commercial card.
* Tested for compatibility with WordPress 7.1.

= 1.1.1 =
* Fixed frontend booking date summaries so month and date names use the current WordPress locale instead of the visitor's browser locale.
* Audited the remaining booking date display paths to preserve WordPress-localized output in cart, checkout, orders, emails and the booking calendar.
* Corrected the English product type labels to Simple booking and Variable booking while keeping them fully translatable.
* Replaced outdated Lite pricing placeholders in simple products and variations with contextual guidance for DevAgent WBR — Dynamic Pricing and a permission-aware link to the plugin's Add-ons page.
* Replaced the browser-localized native month field in Calendar / Bookings with a WordPress-localized month selector and year field.
* Improved the Calendar / Bookings table with a non-wrapping date column and a light red background for blocked dates.

= 1.1.0 =
* Added operational, URL-based Settings tabs registered through the public admin registry.
* Added callback and renderable-block support for extension Settings tabs.
* Added a reserved Licenses tab that becomes visible when extensions contribute content.
* Added normalized extension manifests and installed add-on cards on Upgrade / Add-ons.
* Added an Available add-ons section featuring DevAgent WBR — Dynamic Pricing, automatically hidden when its extension manifest is active.
* Added product, variation and frontend booking extension hooks.
* Added the public `devawbrentbk_booking_selection_changed` JavaScript event.
* Formalized pricing, frontend and extension contracts.
* Added cart-item, session-restoration and order-item extension hooks.
* Added scoped registry callbacks for admin assets.
* Preserved all existing booking settings, product metadata, order metadata and booking behavior.

= 1.0.0 =
* Initial public release.

== Upgrade Notice ==

= 1.2.7 =
Fixes the Calendar / Bookings view when an Hourly add-on is active: per-slot inventory is no longer presented as Base daily Remaining. Date Range bookings, reservations and saved settings are preserved. No data migration required.

= 1.2.6 =
Adds a Video Tutorials tab and official tutorial links without changing booking behavior or saved settings. No data migration required.

= 1.2.5 =
Fixes the Calendar / Bookings table alignment and displays date rules in the correct column. Tested with WordPress 7.1.3. No data migration required.

= 1.2.4 =
Fixes calendar date selection and highlights the complete selected range. Improves minimum booking-length enforcement in the frontend, cart and checkout. No data migration is required.

= 1.2.3 =
Fixes frontend date-range calendar initialization on single-product pages while preserving existing booking and extension contracts.

= 1.2.2 =
Maintenance release that normalizes coding standards while preserving the public API, booking behavior and add-on compatibility of 1.2.1. Validated with WordPress 7.1.2 and WooCommerce 11.1.2.

= 1.2.1 =
Fixes an incomplete WordPress.org package that could cause a fatal error on some installations. Updating is strongly recommended.

= 1.2.0 =
Adds neutral booking-mode contracts for future hourly/appointment add-ons while preserving date-range bookings and Dynamic Pricing compatibility. Tested with WordPress 7.1.

= 1.1.1 =
Fixes locale-aware booking dates and calendar month controls, corrects the booking product type labels, updates Dynamic Pricing guidance, and improves blocked-date visibility.

= 1.1.0 =
Adds stable extension contracts and add-on integration surfaces without requiring data migration or changing existing bookings.
