=== Probono Booking Basic ===
Contributors: probonodesign
Plugin URI: https://bk.prbn.org
Tags: booking, reservation, form, calendar, japanese
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

No coding required - calendar-based booking form. A Made in Japan booking plugin for Japanese websites.

== Description ==

Probono Booking is a reservation form plugin designed and developed specifically for Japanese websites. Create a fully functional booking system with just a few clicks.

== Why Choose Probono Booking ==

* **Made in Japan** - Developed by Japanese developers who understand Japanese web booking systems
* **One-Time Purchase** - No monthly subscription, no recurring fees
* **Japanese Optimized** - Automatic public holidays, substitute holidays, and bridge holidays
* **Lightweight & Fast** - Minimal code for optimal performance

== Free Features ==

**Booking Basics**

* Calendar UI for date and time slot selection
* Concurrent booking limit per slot
* Real-time availability display

**Form Fields**

* 13 built-in field types (pb1 through pb13: name, kana, email, phone, postal code, address, menu select, calendar, notes, checkbox, radio, file upload, agreement)
* Required field settings
* 11 industry templates: salon, restaurant, clinic, lawyer, tax, real estate, hotel, recruiting, pet, cleaning, counseling

**Email Functions**

* Confirmation email to the customer
* Notification email to the administrator
* Automatic reminder email (sent the day before)
* Auto-reply email with customizable body and footer

**Calendar Settings**

* Japanese national holidays auto-applied
* Closed days and ad-hoc closed days
* Business hours configuration
* Reception period (how far in advance bookings can be accepted)

**Data Management**

* CSV export of reservation data
* iCal export (Google Calendar compatible)
* Automatic file-based backup (up to 1500 history entries)
* One-click restore capability from any backup point

**Other**

* Responsive design for mobile and desktop
* Loading spinner during form submission
* Double-submit prevention

== Installation ==

1. Go to Plugins > Add New > Upload Plugin and upload the ZIP file
2. Activate the plugin from the Plugins list
3. Open the Probono Booking menu in the admin dashboard
4. Create a new form and insert the shortcode into your page

== Frequently Asked Questions ==

= Is this for Japanese websites? =

Yes. Probono Booking is designed and optimized for Japanese websites. The interface, field labels, holiday handling, and email templates are all tuned for Japanese business use.

= Is it Made in Japan? =

Yes. Probono Booking is developed by Japanese developers who understand the conventions and expectations of Japanese web booking systems.

= Can I use it with other booking plugins? =

Probono Booking works as a standalone plugin and does not depend on other booking plugins. Running multiple booking plugins on the same page may cause CSS or script conflicts, so we recommend using only one booking plugin per site.

= Does it work with any WordPress theme? =

Yes. The plugin uses scoped CSS and renders inside a containerized form, so it works with most modern WordPress themes without layout issues.

= Is there a monthly fee? =

No. The plugin is a one-time install. There is no recurring fee.

= Where is the reservation data stored? =

In a custom database table on your own site. Reservation data is never sent externally. The plugin makes no outbound HTTP requests at all.

= Are Japanese national holidays supported? =

Yes. Public holidays, substitute holidays (振替休日), and bridge holidays (国民の休日) are applied automatically to the booking calendar.

= Does this plugin collect user data? =

No. Probono Booking does not transmit any personal information to external services. Reservation data submitted through the form is stored only in your own WordPress database. The plugin makes no outbound HTTP requests; Japanese national holidays are computed locally.

== Changelog ==

= 1.0.7 =
* Fixed bookings made through the booking form not appearing on the admin calendar and reminder emails never being sent for them. Booking dates are now stored in a normalized format, existing bookings saved in the old format are read correctly, and dates in emails are still shown in Japanese style.
* Fixed the selected date shifting by one day for visitors in time zones west of UTC.
* The file upload field now actually sends the attached file. The file is validated (size limit and allowed types) and delivered as an attachment of the notification email to the administrator. Previously only the file name was sent.
* The reception toggle on the booking admin page now really stops bookings: while paused, the booking form shows a notice instead of the form, and direct submissions are refused as well.
* Intentionally emptied settings are no longer replaced by preset sentences: the auto-reply opening and closing text (Custom / free text left empty), confirmation screen title, message, button labels and success/error messages, notification email subject, auto-reply subject, and the reception-hours/closed-days panel labels now respect an empty value and match the admin preview.
* The notification email subject now follows the "customize" checkbox: when it is off, the default subject with the current site name is used, instead of a previously saved custom subject.
* The custom label of the remarks field is now shown as the field heading on the booking form, matching the admin preview. Previously it was placed in the placeholder text instead.
* Required checkbox groups now accept any checked option. Previously only the first option satisfied the browser's required check, so checking only the second or later options blocked submission.
* Past dates and already-passed time slots of the current day can no longer be selected or submitted.
* Hardened the submission endpoint: crafted requests with unexpected data types are now rejected safely instead of causing a PHP error on PHP 8, and the anti-bot timing check can no longer be skipped by omitting the hidden timestamp.
* Saving to a deleted form no longer silently re-creates an incomplete form.
* All writes to the booking list (new booking, status change, deletion, restore from backup, reminder bookkeeping) are now serialized with the same lock and re-read the latest data before writing. This prevents a booking arriving at the same moment from being silently lost.
* The notification email to the administrator is now sent only after the booking has passed the final availability check and has been saved. If the notification cannot be sent, the booking is rolled back and the customer is asked to retry, as before.
* Reminder emails are no longer sent for cancelled bookings.
* Notification emails now carry a Reply-To header with the customer's address, so replying in your mail client reaches the customer directly.
* New: per-weekday reception hours. In the closed-days settings each weekday can now have its own reception time range (for example evening-only hours on specific weekdays). Weekdays left blank keep using the common reception hours, so existing settings work unchanged.
* The email and auto-reply previews now match the actual emails exactly (introduction line, date and time rows, receipt timestamp, no honorific suffix), and the confirmation preview matches the actual confirmation screen.
* The booking admin calendar now refreshes after a status change or deletion, failed saves restore the previous status, form name edits on the form cards are saved, settings no longer carry over between forms in any tab, and various small fixes: a back button after a failed submission, a notice when no time slots are available, the last time slot never overruns the closing time, holiday data covers the whole booking period, file names and dates in CSV exports are site-local and spreadsheet-safe, and more.

= 1.0.6 =
* Fixed the save bar (form name, save button and shortcode display) not appearing, and settings changes not being saved, when a settings tab was opened directly from the top tabs without first choosing a form with Edit. Opening a settings tab now automatically selects a form, so the save button always shows and your changes are saved reliably.

= 1.0.5 =
* You can now change the message shown to customers when their chosen date and time has reached the booking limit. Set it in the calendar section of the form settings; if left blank, the standard message is used.
* Added protection against double bookings. Once a time slot is fully booked, further bookings for that slot are refused, including submissions sent without using the booking form. The limit is respected even when several customers book at the same moment. Cancelled bookings free up their slot, and second-choice dates do not take up a slot.
* Redesigned the weekly closed-days settings. For each weekday you can choose a full-day, morning-only or afternoon-only closure, or leave it blank to stay open. Break times apply only to weekdays with a closure set, the break-time fields are visibly disabled on open days, and the panel heading can be renamed freely.
* Fixed the time choices on the booking form not following the configured reception hours and interval, sometimes showing only a single time. The cause that kept the configured reception hours from reaching the booking form has been removed.
* Fixed saved settings, such as the reception hours, being rolled back to older values after working in another settings tab or saving again. Each settings screen now saves only its own part and no longer overwrites what other screens have saved with stale data.
* Fixed the confirmation screen, notification email and auto-reply settings showing their default values after saving and then silently re-saving those defaults over your saved settings. Saved values are now loaded back into the screens correctly.
* Fixed line breaks typed into settings text being lost when saved.
* Fixed changes being lost when switching quickly between forms. A clear notice that changes are saved automatically is now shown, and automatic and manual saves no longer conflict.
* Renamed the per-weekday input field to break time to match what it actually does. It was previously labelled as reception hours, which invited entering your opening hours there and made those times unavailable for booking.
* The booking form now requires a time to be chosen when a date is selected. Previously a date could be submitted without choosing a time.
* Fixed reminder emails that failed to send being treated as sent, which prevented them from being sent again. They are now marked as sent only after successful delivery.

= 1.0.4 =
* Simplified the wording in this changelog for clarity. No functional changes.

= 1.0.3 =
* Confirmed compatibility with WordPress 7.0.
* Added Manual tab to the admin UI linking to the official manual page on bk.prbn.org.
* Updated plugin header to declare Requires at least, Tested up to and Requires PHP fields.
* No functional changes to booking, calendar, email or admin behaviour.

= 1.0.2 =
* Further internal improvements made in preparation for the WordPress.org plugin review. Existing sites are updated automatically and all saved booking data is carried over without any action on your part.

= 1.0.1 =
* Internal improvements made in preparation for the WordPress.org plugin review. Existing sites are updated automatically and all saved booking data is carried over without any action on your part.

= 1.0.0 =
* Initial release.
* Compute Japanese national holidays locally; removed external API dependency.

== Upgrade Notice ==

= 1.0.7 =
Adds per-weekday reception hours, fixes bookings not appearing on the admin calendar and reminder emails not being sent, delivers real file attachments, makes the reception pause toggle effective, respects intentionally empty settings, and hardens booking-data writes. Update strongly recommended.

= 1.0.6 =
Fixes the save button not appearing and settings not saving when a settings tab is opened without first choosing a form to edit. Update recommended.

= 1.0.5 =
Adds double-booking prevention and a customizable fully-booked message, redesigns the closed-days settings, and fixes settings and time-slot issues. Update recommended.

= 1.0.4 =
Documentation wording simplified for clarity. No functional changes.

= 1.0.3 =
WordPress 7.0 compatibility confirmed; adds Manual tab linking to the official documentation.

= 1.0.2 =
Further internal improvements for the WordPress.org plugin review. Existing sites update automatically and saved booking data is preserved.

= 1.0.1 =
Internal improvements for the WordPress.org plugin review. Existing sites update automatically and saved booking data is preserved.

= 1.0.0 =
Initial release.
