=== Automaize Restaurant Reservation ===
Contributors: automaize
Tags: restaurant, reservation, booking, table booking, elementor
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A simple table reservation system for restaurants. Guests check live availability by party size and time, then get an instant email confirmation.

== Description ==

Automaize Restaurant Reservation adds a simple, self-contained table booking form to your restaurant website.

**For the restaurant owner:**

* Define your weekly opening hours (per day of the week).
* Add closed periods for holidays or vacation, which override the weekly hours for those dates.
* Add your tables, each with its own seat count.
* Choose which reservation lengths guests can pick from (e.g. 60, 90, 120 minutes).
* Set the email address that should receive new reservation notifications.
* Manage and cancel reservations from a simple admin screen.

**For your guests, on the reservation form:**

1. Enter the number of guests.
2. Pick a date and how long they'd like to stay.
3. See, in real time, whether a table is available for that party size and time.
4. Enter their name, email, optionally a phone number and any special requests, and book instantly.
5. Receive an email confirmation. The restaurant owner is notified by email as well.

The plugin matches each reservation to the smallest available table that fits the party size, so a party of two won't tie up your largest table, and automatically prevents double-booking a table for overlapping time windows.

No external services or API keys required, and no data ever leaves your site.

= AI disclosure =

This plugin's code was developed with the assistance of an AI coding tool (Claude, by Anthropic). All code was reviewed and tested by Automaize before release.

= Usage =

Add the reservation form to any page or post in either of these ways:

* **Shortcode:** place `[amzres_reservation_form]` in the page/post content, in a Shortcode block, or in any widget area that supports shortcodes.
* **Elementor:** drag the "Restaurant Reservation Form" widget (listed under the General category) onto the page, if Elementor is active.

Both display the exact same form; there is nothing extra to configure per placement, since opening hours, tables and durations are all set once under **Reservations**.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/automaize-restaurant-reservation` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to **Reservations → Tables** and add your tables.
4. Go to **Reservations → Settings** and set your opening hours, allowed reservation durations and notification email. The shortcode is also shown on this screen.
5. Add the `[amzres_reservation_form]` shortcode to a page, or add the "Restaurant Reservation Form" widget in Elementor.

== Frequently Asked Questions ==

= Can I have different opening hours per day? =

Yes. Each day of the week has its own opening/closing time, and can be marked closed entirely.

= Can I close the restaurant for a holiday or vacation? =

Yes. Under **Reservations → Settings**, add a closed period with a start and end date (and an optional reason, for your own reference). Dates within that range are treated as closed regardless of the weekly opening hours.

= What happens if two guests try to book the last table at the same time? =

Availability is re-checked on the server at the moment a reservation is submitted, so only one of them will succeed; the other is asked to choose a different time.

= Does this plugin send confirmation emails? =

Yes, it uses `wp_mail()` to send a confirmation to the guest and a notification to the restaurant's configured email address.

= Does this require any external services or API keys? =

No. Everything runs on your own WordPress installation.

= Does this work with Elementor? =

Yes, a native "Restaurant Reservation Form" widget is available in the Elementor editor (under the General category) whenever Elementor is active. It renders the exact same form as the `[amzres_reservation_form]` shortcode.

= Does this work with Breakdance or other page builders? =

Yes. Use the `[amzres_reservation_form]` shortcode in your page builder's Shortcode or Code/HTML element (Breakdance, Divi, Bricks, etc. all provide one). The form works the same way everywhere it's placed.

== Screenshots ==

1. The frontend reservation form.
2. The Tables admin screen.
3. The Reservations admin screen.
4. The opening hours settings screen.

== Changelog ==

= 1.3.0 =
* Renamed all internal function, class, hook and option names to use a unique `amzres_`/`AMZRES_` prefix (previously `arr_`/`ARR_`, which was too short and could conflict with other plugins), per WordPress.org plugin review requirements. Existing data is migrated automatically on update; no action needed.
* Removed the bundled German translation files. Translations for WordPress.org-hosted plugins are managed automatically via translate.wordpress.org.

= 1.2.0 =
* Added closed periods (holidays, vacation): date ranges under Settings that override the weekly opening hours.

= 1.1.0 =
* Added an optional "Special requests" field to the reservation form, shown to the restaurant owner in the admin reservations list and in both emails.
* Fixed the time selector only ever showing one bookable time slot in some setups.
* Fixed the anti-spam honeypot field being visible when the form was rendered outside the shortcode's own page content (e.g. some page builder widgets).

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.3.0 =
Internal renaming for WordPress.org compliance; all existing tables/settings are migrated automatically. Safe to update.

= 1.2.0 =
Adds closed periods (holidays/vacation) under Settings. Safe to update, no manual steps required.

= 1.1.0 =
Adds an optional special requests field; fixes a time slot selection bug. Safe to update, no manual steps required.

= 1.0.0 =
Initial release.
