=== Simple Entry Booking for WooCommerce ===
Contributors: anhqui
Tags: woocommerce booking, booking calendar, appointment booking, woocommerce date picker, rental booking
Requires at least: 5.0
Tested up to: 7.1
Stable tag: 1.0.9
Requires PHP: 7.4
WC requires at least: 5.0
WC tested up to: 11.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Free WooCommerce booking plugin — add a date & time picker to any product for appointments, rentals, and services. No subscription required.

== Description ==

**Simple Entry Booking for WooCommerce** adds a booking date field, and an optional time field, to your WooCommerce product pages. You set your weekly hours, closed days, daily booking limits and weekday discounts on one settings page.

It works inside the normal WooCommerce cart, checkout and orders. Customers pick a date, add the product to the cart and pay as usual. The booking date and time are saved with the order, so you see them in the admin and in order emails.

---

= Who Is This Plugin For? =

**Equipment & Vehicle Rentals**
Set a daily booking limit, block weekends or other days off, and let customers pick the date they need the gear. When a day is full, it can't be booked.

**Appointment-Based Services**
Set a start and end time for each day of the week. Customers pick a time within your hours, and fully booked dates are greyed out in the calendar.

**Tour Operators & Event Bookings**
Limit how many bookings each day of the week can hold, block days you're closed, and offer weekday discounts to fill slow days. (Blocking exact holiday dates is a Pro feature.)

**Freelancers & Consultants**
A clean booking date field on your service products lets clients choose their preferred date without leaving WooCommerce.

---

= Free Version Features =

**Booking Date & Time Fields**
* A jQuery UI date picker on your WooCommerce product pages
* Past dates can't be picked
* Optional time field (turn on **Enable Booking Time**)
* Change the labels of the date and time fields to match your store

**Weekly Schedule & Limits**
* One simple table with a row for each day of the week
* **Block Day:** turn off any day of the week (for example Saturdays and Sundays)
* **Start Time** and **End Time:** the booking time must be within the day's hours
* **Max Bookings:** when a day of the week reaches its limit, that date is greyed out in the calendar
* If a date doesn't have enough spots left, the product can't be added to the cart and the customer sees a "not enough spots" message
* Booking counts include orders that are pending, on hold, processing or completed, plus the bookings already in the customer's own cart

**Weekday Discounts**
* A percentage or fixed-amount discount for each day of the week (for example 10% off on Mondays)

**Category Control**
* With no category selected, the booking field shows on all products
* Select categories to show the booking field only on those products
* Child categories are included when you select a parent category

**WooCommerce Integration & HPOS**
* The booking date and time are saved to the cart, checkout and order details
* Customers see them in their order emails; you see them on the WooCommerce order screen
* Compatible with **WooCommerce High-Performance Order Storage (HPOS)**

---

= Why Choose Simple Entry Booking? =

* **Free forever** — core booking functionality with no forced upgrades
* **Lightweight** — no page-builder dependencies, no bloated scripts
* **No subscription fees** — unlike most WooCommerce booking plugins
* **Native WooCommerce** — works inside the standard cart/checkout/orders flow
* **HPOS-ready** — future-proof for modern WooCommerce performance
* **Easy to configure** — one settings page, sensible defaults, ready in minutes

---

= Pro Version: Built for Tours, Rentals and Appointments =

Running several tours, rooms or services with different schedules? Pro gives each product its own rules.

**New in Pro 1.0.9**

* **Per-product booking rules** — A new **Booking** tab on the product edit screen lets each product use its own **Availability**, **Schedule & Time**, **Limits & Capacity** and **Discounts** settings. You customize only the sections you need; the rest keep using the global settings. Products with their own rules are labelled **Booking: Custom** in the products list.
* **Capacity counting per product** — Choose whether booking limits are shared across all bookable products or counted separately for each product.
* **Checkout re-check** — Dates and remaining spots are checked again in the cart and at checkout. If a date fills up or gets blocked while an item sits in the cart, it can't be overbooked.
* **Built-in user guide** — Open it from the **User Guide** button in the plugin. Available in English, French and Spanish.

**Everything else in Pro**

* **Break times** — Set breaks for each day of the week (for example lunch 12:00–13:00) that customers can't book
* **Minimum Days Ahead** — Customers must book at least a set number of days in advance
* **Block Holiday Dates** — Block exact dates for holidays, closures or vacations
* **Booking limits for specific dates** — Override the weekday limit for a date; a limit of 0 blocks the date completely
* **Discounts for specific dates** — Percentage or fixed discounts for exact dates, overriding the weekday discount
* **Enable booking on individual products** — Choose single products as well as categories
* **Priority developer support**

Pro is a separate plugin. When you install Pro, deactivate the free plugin. Pro keeps its own settings, so you set it up again in Pro (it takes a few minutes).

[**Upgrade to Pro →**](https://checkout.freemius.com/plugin/22403/plan/37496/)

---

= Free vs Pro at a Glance =

**Free includes**

* Booking date field and optional time field on product pages
* Weekly schedule: blocked days, start and end times
* Max bookings for each day of the week
* Discounts for each day of the week
* Booking field on all products, or only on selected categories
* Booking details in the cart, checkout, orders and emails
* HPOS compatible

**Pro adds**

* Per-product booking rules (New in 1.0.9)
* Capacity counting shared or per product (New in 1.0.9)
* Re-check of dates and spots in the cart and at checkout (New in 1.0.9)
* Built-in user guide in English, French and Spanish (New in 1.0.9)
* Break times, Minimum Days Ahead and holiday dates
* Booking limits and discounts for specific dates
* Booking on individual products
* Priority support

---

== Installation ==

1. In your WordPress dashboard, go to **Plugins > Add New** and search for "Simple Entry Booking for WooCommerce"
2. Click **Install Now**, then **Activate**
3. Go to **Settings > Booking Date Picker** to configure the plugin
4. The booking date (and optional time) field will automatically appear on your WooCommerce product pages

**Manual Installation:**
Upload the plugin folder to `/wp-content/plugins/simple-entry-booking-for-woocommerce` and activate it from the **Plugins** screen.

Using Pro? Deactivate the free plugin first, then install and activate Pro.

== Frequently Asked Questions ==

= Is this plugin really free? Are there hidden fees? =
Yes, the core plugin is completely free with no hidden charges. It's fully functional for standard single-date bookings. A separate Pro version adds per-product booking rules, break times, holiday dates, minimum days ahead, date-specific limits and discounts, a checkout re-check and a built-in user guide.

= What's the difference between Free and Pro? =
Free gives you one set of booking rules for your whole store: a weekly schedule, daily limits, weekday discounts and category control. Pro adds rules per product and per date, break times, holiday dates and more. See "Free vs Pro at a Glance" in the description above.

= Does this plugin work without WooCommerce? =
No. Simple Entry Booking is an add-on for WooCommerce. You must have WooCommerce installed and activated for this plugin to work.

= How do I add a booking date picker to my WooCommerce product? =
After activating the plugin, go to **Settings > Booking Date Picker** and configure your preferences. By default, the booking field appears on all products. You can use the Category Control setting to restrict it to specific product categories only.

= Can I show the booking calendar on specific products only? =
In the free version, you can limit the booking field to selected product **categories** (child categories are included). Pro also lets you choose **individual products** as well as categories.

= Can each product have its own booking days, hours and limits? =
Yes, in Pro 1.0.9. The **Booking** tab on the product edit screen lets you customize Availability, Schedule & Time, Limits & Capacity and Discounts for that product, section by section. Sections you don't customize keep using the global settings.

= Can different tours or services have their own number of seats? =
Yes, in Pro. Give a product its own Limits & Capacity section on the Booking tab, or use the **Capacity Counting** option to count bookings separately for each product.

= How does the booking availability limit work? =
You can set a maximum number of bookings for each day of the week. Bookings are counted from orders that are pending, on hold, processing or completed, plus the items already in the customer's own cart. When the limit is reached, the date is greyed out and can't be added to the cart. Pro also re-checks dates and spots in the cart and at checkout.

= Can I block weekends or specific days of the week? =
Yes. In the Settings page, you can block any combination of weekdays (Monday through Sunday) from being selectable on the calendar. To block specific dates (like public holidays), upgrade to the Pro version.

= Can I block holidays or set a lunch break? =
Yes, in Pro. Use **Block Holiday Dates** to block exact dates, and add **break times** to each day of the week so customers can't book during them.

= Can I require customers to book a few days in advance? =
Yes, in Pro. Set **Minimum Days Ahead** and customers must book at least that many days in advance.

= Does the plugin support booking discounts? =
Yes. The free version supports percentage or fixed-amount discounts applied to specific days of the week (e.g., 10% off every Tuesday). For discounts on specific calendar dates, see the Pro version.

= Does this plugin support multi-day or date-range bookings? =
No — this plugin is intentionally designed for **single-date** bookings only (one date per order item). It is optimized for daily rentals, single appointments, and one-day service bookings. For multi-day or date-range bookings, this is not the right plugin.

= Where does the booking date appear after the customer orders? =
The selected booking date and time are stored as order meta and displayed:
* On the **Cart page** alongside the product
* On the **Checkout page** in the order summary
* In the **WooCommerce Order details** in the admin dashboard
* In the **Customer order confirmation email**

= Can I customize the label of the booking date field? =
Yes. You can change the frontend label of both the date field and the time field to any text you want from the **Settings > Booking Date Picker** page.

= Is there a user guide? =
Pro includes a built-in user guide in English, French and Spanish, opened from the **User Guide** button. The free plugin is set up from a single settings page, **Settings > Booking Date Picker**.

= Will my settings carry over if I upgrade to Pro? =
No. Pro is a separate plugin with its own settings, so your free settings aren't copied over. Deactivate the free plugin, install Pro and set it up again (it takes a few minutes). In Pro, select the products or categories that should show the booking field.

= Is this plugin compatible with WooCommerce HPOS (High Performance Order Storage)? =
Yes. The plugin is fully compatible with WooCommerce High Performance Order Storage. It uses optimized SQL queries and hidden meta keys (`_booking_date`) to maintain excellent performance even on large stores.

= Is Simple Entry Booking compatible with the latest version of WooCommerce? =
Yes. The plugin is regularly tested with the latest versions of WordPress and WooCommerce. The "Tested up to" field in the plugin header always reflects the most recently verified version.

= Will this work with my theme? =
The plugin outputs standard WooCommerce hooks and uses jQuery UI datepicker, which is included in WordPress by default. It should work with any properly coded WooCommerce-compatible theme.

== Screenshots ==

1. **Product Page (Frontend):** The booking date and optional time fields as they appear to customers on a single product page.
2. **Admin Settings — General:** Configure the booking label, enable time selection, and set the time field label.
3. **Admin Settings — Weekly Schedule & Booking Rules:** Set available hours, daily booking limits, blocked weekdays, and weekday discounts — all in one table.
4. **Admin Settings — Product Categories:** Restrict the booking field to specific product categories, with search and select all/none controls.
5. **(Pro) General settings:** minimum days ahead and holiday dates.
6. **(Pro) Weekly schedule with break times** for each day.
7. **(Pro) Capacity counting** and booking limits for specific dates.
8. **(Pro) Discounts for specific dates**, on top of weekday discounts.
9. **(Pro) Enable booking on individual products or categories**, with the built-in User Guide.
10. **(Pro) New Booking tab:** give any product its own booking rules.
11. **(Pro) Per-product availability, schedule, capacity and discounts.**
12. **(Pro) Booking date and time on the product page.**
13. **(Pro) Booking details in the cart**, re-checked at checkout.
14. **(Pro) Products with their own rules are labelled "Booking: Custom".**

== Changelog ==

= 1.0.9 =
* Tested with WordPress 7.1 and WooCommerce 11.2.1.
* Updated the plugin description, FAQ and screenshots, including Pro features such as per-product booking rules.
* Corrected the description of how booking limits are counted.

= 1.0.8 =
* Explicitly declared compatibility with WooCommerce High-Performance Order Storage (HPOS) so the plugin is no longer flagged as incompatible under WooCommerce > Settings > Advanced > Features.

= 1.0.7 =
* Fixed a bug where, after Category Control was configured, adding a product that is not eligible for booking to the cart could be blocked by a "Please select a booking date" error even though that product never shows the booking field.
* Confirmed compatibility with WordPress 7.0.4 and WooCommerce 11.0.1.

= 1.0.6 =
* Redesigned the Booking Date Picker settings page with a cleaner, card-based layout.
* Combined the Weekly Schedule, Daily Booking Limits, Block Weekdays, and Discount per Weekday settings into a single unified table (one row per weekday).
* Added toggle switches for Enable Booking Time and Block Day for a more intuitive on/off experience.
* Added search and Select All / Select None controls to the Product Categories picker.
* Improved responsive layout for smaller screens.

= 1.0.5 =
* Added Category Control feature: Enable booking field only for specific product categories.
* Supports hierarchical categories (child categories included when parent is selected).
* Improved settings page organization.

= 1.0.4 =
* Implemented robust quantity-based counting for booking limits.
* Added support for multi-quantity bookings.
* Enhanced HPOS compatibility with optimized SQL queries.
* Added hidden meta key (_booking_date) for improved query performance.
* Improved visual blocking with real-time availability checking.
* Updated promotional content with comprehensive feature list.

= 1.0.3 =
* Refactored plugin prefixes to be unique (sebfw_).
* Added nonce verification for security.
* Updated contributors list.

= 1.0.2 =
* Fixed WordPress coding standards issues (I18n, escaping, date functions).
* Updated readme tags.

= 1.0.1 =
* Fixed syntax error in settings page HTML output.
* Added class existence check to prevent redeclaration errors.
* Improved settings saving logic for checkboxes.
* Fixed missing datepicker navigation icons (prev/next arrows).
* Created languages directory for translation support.

= 1.0.0 =
* Initial release.
* Added Booking Date and Time fields.
* Added Weekly Schedule and Blocked Weekdays settings.
* Implemented Cart and Order data saving.
* Disabled past dates in booking date picker.
* Added PRO Upsell box.
