Flexatech Table Reservations

By FlexaTech

0+ active installationsVersion 1.1.0

Table reservations for restaurants, cafes and bars: a booking form, a page where guests change or cancel, and a day-by-day reservation book.

Description

Flexatech Table Reservations takes table bookings on your own site. Guests pick a party size, a day and a free time, then leave their name and a way to reach them. The plugin finds a table that fits, and you see every booking in the admin, day by day.

  • A reservation form, as a block or the [fxtr_reservation_form] shortcode.
  • A page where guests change or cancel their booking from the link in their email, as a block or the [fxtr_manage_reservation] shortcode. No account needed.
  • Tables, areas, shifts and closed dates, so only real free times are offered.
  • The table is held for a few minutes while the guest fills in the form.
  • Confirm every booking yourself, or let small parties through on their own.
  • HTML emails for the guest and for you, with an editor in the admin, and a reminder before the booking.
  • Optional: Google Calendar sync, Sign in with Google on the form, Cloudflare Turnstile against spam, a map of your address, and a webhook.

External services

The plugin works without any of the services below. The deactivation survey is the only one on by default, and it runs only in the admin. Every other service is off until you turn it on or fill in its keys.

Deactivation feedback (Flexa Product Intelligence)

When you go to deactivate Flexatech Table Reservations on the Plugins screen, a short optional survey asks why. It is served by Flexa’s product intelligence service at https://product-intelligence.flexacommerce.com. It runs only on wp-admin/plugins.php, never on the front end, and never blocks deactivation.

What is sent, and when:

  • On opening the Plugins screen: a request to /api/v1/config (product slug and tier) to load the survey configuration. The answer is cached for 6 hours.
  • When you deactivate or use the survey: the reason you pick and any message you choose to type, sent to /api/v1/deactivations, /api/v1/events, /api/v1/feedback, /api/v1/feature-requests and /api/v1/recovery-events.

Every request includes an anonymous per-site identifier (a random UUID), the plugin version and tier. By default the survey also sends your WordPress version, PHP version and locale. No email, site domain, user identity, IP address or reservation data is collected. To stop sending the environment details, use add_filter( 'fxtr_deactivation_survey_config', fn( $c ) => [ 'collect_environment' => false ] + $c );. To turn the survey off completely, use add_filter( 'fxtr_deactivation_survey_enabled', '__return_false' );.

Flexa Terms of Service: https://flexacommerce.com/pages/terms
Flexa Privacy Policy: https://flexacommerce.com/pages/privacy

Google Calendar API

Copies bookings to a Google calendar you choose, and can read a second calendar whose events block online booking at those times. It runs only after you connect a Google account in the Google Calendar tab, with an OAuth client you create in Google Cloud.

  • When you connect or disconnect: your site talks to accounts.google.com and oauth2.googleapis.com to sign in, refresh and revoke the access token.
  • When a booking is made, moved or cancelled: your site sends the event to www.googleapis.com. The event holds the guest’s name, party size, date and time, table names, phone, email, notes and a link to the booking in your admin.
  • When the form shows free times: your site asks www.googleapis.com for the events on the blocking calendar for that day.

Google Terms of Service: https://policies.google.com/terms
Google Privacy Policy: https://policies.google.com/privacy
Google APIs Terms of Service: https://developers.google.com/terms

Sign in with Google (Google Identity Services)

When you tick “Sign in with Google on the booking form”, the guest’s browser loads https://accounts.google.com/gsi/client on the booking page. A guest who uses the button shares their name and email address from their Google account, which fill in the form. Nothing is sent to Google from your server.

Google Terms of Service: https://policies.google.com/terms
Google Privacy Policy: https://policies.google.com/privacy

Cloudflare Turnstile

When you fill in a Turnstile site key and secret key, the guest’s browser loads https://challenges.cloudflare.com/turnstile/v0/api.js on the booking page to check that the guest is a person. When the form is sent, your site sends the Turnstile answer, your secret key and the guest’s IP address to https://challenges.cloudflare.com/turnstile/v0/siteverify.

Cloudflare Website Terms of Use: https://www.cloudflare.com/website-terms/
Cloudflare Privacy Policy: https://www.cloudflare.com/privacypolicy/

Google Maps

When you tick “Show a map”, the booking page shows a Google Maps embed (https://maps.google.com/maps) of the restaurant address you entered. The guest’s browser loads it from Google. The directions link next to the address also opens Google Maps. Only the restaurant’s address is sent, never guest data.

Google Maps Terms of Service: https://maps.google.com/help/terms_maps/
Google Privacy Policy: https://policies.google.com/privacy

Webhook

When you fill in a webhook URL, your site sends a JSON POST to that URL when a booking is made, changes status or moves. The body holds the booking, including the guest’s name, phone, email, party size, date, time and notes. The URL is one you choose and control, so its terms and privacy policy are those of whoever runs it.

Source code

The admin screen is a React app compiled into assets/dist. Its source ships with the plugin in apps/admin/src, together with the build files: package.json, pnpm-lock.yaml, apps/admin/vite.config.ts and apps/admin/tsconfig.json.

To build it:

  1. Install Node.js 20 or later and pnpm 9 or later (npm install -g pnpm).
  2. Run pnpm install in the plugin folder.
  3. Run pnpm build. The files are written to assets/dist.

The JavaScript and CSS in assets/js and assets/css are not compiled and can be read as they are.

Installation

  1. Upload the flexatech-table-reservations folder to /wp-content/plugins/, or install it from the Plugins screen.
  2. Activate the plugin.
  3. Open Flexatech Table Reservations in the admin menu, add your tables and shifts, and place the reservation form on a page.

Screenshots

Changelog

1.1.0

  • Staff can see and edit the answers to your own form fields in the reservation dialog. Answers to fields you later removed stay on the reservation.
  • The guest’s reservation page shows what they filled in: name, phone, email, notes and the answers you show in emails.
  • Cancelling from the reservation page asks in a dialog that matches the page, in place of the browser’s confirm box.
  • The reservation page says when the guest is seated, has dined or was marked a no-show, and hides Add to calendar once the visit is over.
  • In the reservation book, Seat, Finish and No-show ask first when the booked time has not come yet (Seat allows 15 minutes early). Cancel asks in the same dialog in place of the browser’s confirm box.
  • The admin header shows the site’s time and time zone, with a link to Settings › General to change it. A site still on UTC is pointed out.
  • Settings has a Booking form colors section: the accent (the ring around the field in use and the picked day), the times and buttons, and their text. Left blank, the form keeps its own colors or the theme’s.
  • Floor can import tables from a CSV file, with a template to download. The file is checked first: new areas are listed, tables already there by name are skipped, and nothing is added while a line has an error.
  • In the shift dialog on the booking form, only the photo and description scroll, with a slim scrollbar, so the title and Select stay in view.
  • The form builder groups fields as the guest sees them: the search bar, Your information, More about the visit and Checkboxes. A field added among Your information is required.
  • Only fields under Your information can be half width.
  • Lists in the admin and on the booking form (guests, part of the day, times, your own choice fields) open as one dropdown style, with a search box once a list has more than eight options. Search ignores case and accents. The browser’s own select stays underneath and still holds the value that is sent.
  • Dropdowns in the admin use the full width of their column.
  • With no shifts yet, Shifts offers the hours most restaurants keep (lunch and dinner, dinner only, all day, or breakfast, lunch and dinner) to check and add in one go. A new shift can start from Breakfast, Brunch, Lunch, Dinner, Late night or All day.
  • The booking form has a second layout, Numbered steps (block setting Layout, or layout="steps" in the shortcode): each step under a numbered heading, and guests, date and shift as labelled fields in place of the search bar. The search bar stays the default.
  • A new closed day can be picked in one click: today, tomorrow, this weekend, the next 7 days, or the next Christmas, New Year’s Eve or New Year’s Day. Nothing repeats; a weekday closed every week is unticked in the shift.
  • The reservation blocks no longer collapse in the block editor.
  • For add-ons that run more than one restaurant on a site: tables, areas, shifts, closed dates and reservations each belong to a restaurant (the site’s own unless an add-on says otherwise), through the fxtr_location filter. An add-on that lists its restaurants through fxtr_locations gets a location column in the table import, by name or number. The reservation form shortcode passes locations on to the block, for an add-on that lets the guest pick the restaurant first.
  • Add-ons can open the reservation edit dialog, ask before an early or final status change as the book does, and change a reservation through the same calls the book makes. An add-on’s floor plan uses this, and can also move a party to other tables at the same time, or seat it at several tables pushed together (refused while another party holds one of them, and asked first when they seat fewer guests than the party).

1.0.1

  • New: an optional, anonymous survey when you deactivate the plugin. It never blocks deactivation and can be turned off with a filter. See External services.

1.0.0

  • First release.