=== Mesabook ===
Contributors: zalizamarketing
Tags: reservations, restaurant, booking, tables, deposits
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Take table bookings on your own site. Opening hours, a calendar of closed days, turnaround times, pacing and optional Stripe deposits.

== Description ==

Mesabook is a booking system for restaurants. Guests pick a date, a party size and a time; the plugin works out whether you can actually seat them and holds the table while they finish booking.

It is built around one availability engine rather than a form with a calendar bolted on. The engine knows about your shifts, how long a table is held, the turnaround between sittings, how many covers your kitchen can start at once, and which tables can be pushed together.

Everything is free. There is no paid tier, no upsell inside the plugin, and no feature that stops working after thirty days.

= Simple until you need more =

Out of the box Mesabook asks four things: when you open, how many people fit, how big a party you take, and how many bookings you want in a day. That is the whole setup, and it is enough for most restaurants.

You can ask for a deposit from here too, one amount for the whole week. Switch to detailed mode and you get areas, individual tables, tables that combine, turnaround buffers, pacing per slot, and a different deposit per shift. Nothing is hidden behind a paywall; it is hidden behind a setting, because a restaurant that seats forty people should not have to draw a floor plan first.

= What it does =

* **Shifts, not opening hours.** Lunch and dinner on the same day, different rules for each, different rules per weekday. A dinner service that runs past midnight is an ordinary shift, not a special case.
* **Tables or covers.** A dining room assigns individual tables and can push two of them together for a party of four. A terrace can simply count covers against a capacity. Both live in the same restaurant.
* **Turnaround time.** Set how long a booking holds a table and how long you need before you can offer it again.
* **Pacing.** Cap how many bookings, or how many guests, may start in the same fifteen minutes, so the kitchen is not hit by twelve covers at once.
* **Two-step booking.** A slot is held for a few minutes while the guest types their details, then confirmed. Without this, two people on the same page at 8pm on a Saturday both get the last table.
* **Deposits, if you want them.** Stripe Checkout, per booking or per guest, only for the shifts you choose. A booking is only ever confirmed by a signed webhook, never because a browser came back to your site.
* **Emails that arrive.** Confirmation, approval, cancellation and a reminder, each as HTML with a plain text alternative, each carrying a link the guest can cancel from.
* **A diary and an agenda.** A filterable list for the day's bookings and a timeline of tables against hours, both usable by staff who cannot reach your settings.
* **A calendar for the year's exceptions.** Click a day to close it, or to give it hours of its own. Book a fortnight off in one entry rather than fourteen. A day given its own hours can open although you never open that weekday, which is what a bank holiday actually needs.
* **Your timezone, not WordPress's.** Every restaurant has its own, so a group can run Madrid and the Canaries from one site.

= An admin that gets out of the way =

The diary opens on the numbers a host actually wants: how many bookings and how many people, with the day, tomorrow and the week one click apart. Search folds away until you need it. A restaurant that has just installed the plugin gets three steps to follow, and they disappear once they are done.

= Where it goes on your site =

Three ways, whichever suits your site:

* The **Booking form** block, in the block editor.
* The **Booking form** widget, in Elementor.
* The `[mesabook]` shortcode, anywhere else.

The admin tells you which of your pages the form is on, and offers to make the page for you if it is on none.

`[mesabook title="Book a table" max_party="10" show_areas="1"]`

= Privacy =

Mesabook stores the name, email address, phone number and notes a guest gives when booking, and links them to that booking. It plugs into the personal data export and erase tools WordPress already provides, and can clear personal details automatically a set number of days after a booking. Erasing a guest keeps the booking with the person removed, because a restaurant still needs to know its covers.

The plugin makes no outbound requests except to Stripe, and only when you have configured Stripe. There is no telemetry and no update check of its own.

= What it deliberately does not do =

* It does not issue invoices or till receipts. When a deposit is paid it produces a numbered acknowledgement, clearly marked as not a tax document. Your accounting software issues the invoice.
* It does not bundle the Stripe PHP library. Several other plugins do, and two copies at once is a fatal error. Mesabook talks to the Stripe API over HTTP instead.
* It does not load a JavaScript framework on your public pages. The booking form is around 3 KB gzipped.

== Installation ==

1. Install and activate the plugin.
2. Go to **Mesabook → Restaurants** and add your restaurant. The timezone here is the one every opening hour is read in.
3. Go to **Floor plan** and add your areas and tables.
4. Go to **Schedule** and add your shifts.
5. Put the **Booking form** block, or the `[mesabook]` shortcode, on a page.

Mesabook needs the InnoDB storage engine. It checks on activation and refuses to install without it, because holds depend on transactions that MyISAM cannot provide.

== Frequently Asked Questions ==

= Do I have to set up tables? =

No. In the default simple mode there are no tables and no areas: you set a capacity for the room and bookings are counted against it. Tables, combinations and floor plans live in detailed mode, for the restaurants that work that way.

= Does it work with Elementor? =

Yes. Search for "Booking form" in the Elementor panel. The block editor and the shortcode work too.

= How do I close for the holidays? =

Mesabook → Calendar. The Holidays box takes a first and a last day, so a fortnight in August is one line. Add a line for each stretch you close, and August and Christmas go in together. To shut a single day, click it in the month and choose "Closed all day". Reopening one day of a holiday does not cancel the rest of it.

= Can I open on a day I normally close? =

Yes. Click that date in the calendar and choose "Hours just for this day". Those hours replace the usual week for that date only, so a restaurant that never opens on Mondays can still serve lunch on a bank holiday Monday.

= Do I need Stripe? =

No. Deposits are off unless you ask for one, and everything else works without any payment provider.

= Can I take a deposit without setting up a floor plan? =

Yes. Mesabook → Opening hours has a deposit box: one amount for the whole week, per booking or per guest. A different deposit on a Friday needs per-shift settings, and those live in detailed mode.

= Will my confirmation emails arrive? =

Only if your site can send mail properly. WordPress sends straight from your server by default, which most inboxes distrust. Install an SMTP plugin and point it at your own mailbox or a sending service. Mesabook warns you, on its own screens, when it cannot see one.

= Can I take a booking over the phone? =

Yes. The diary has a form for it, and an override for walk-ins and for the regular you always find room for, which books the table without checking availability.

= Can staff use it without being administrators? =

Yes. Mesabook adds a **Mesabook host** role that can work the diary and the agenda but cannot reach the settings or the Stripe keys.

= What happens to my data if I delete the plugin? =

Nothing, unless you asked for it to go. Bookings, guests and settings survive deletion by default, because deleting a plugin is a common way to test a conflict. There is a setting to remove everything instead.

= Does it work with my theme? =

The booking form inherits your theme's typography and colours and only styles its own layout. Every colour it uses is a CSS custom property you can override.

== Screenshots ==

1. The booking form on the public side of the site.
2. The day's bookings, filtered and counted by status.
3. One booking in full: status, the tables it holds, and the note for the floor.
4. The agenda: tables down the side, hours across the top.
5. Shifts for the week, including a dinner that runs past midnight.
6. The calendar: closed days, holidays and days given hours of their own.
7. The floor plan: areas and the tables inside them.

== Changelog ==

= 0.1.0 =
* First release.

== Upgrade Notice ==

= 0.1.0 =
First release.
