Developer docs

WordPress quickstart

Install the BookDinePlay plugin, paste a publishable key and put a booking form on any page with one shortcode — no code and no theme changes.

You will install the plugin, save one key and show a working booking form on a page. You need a WordPress 6.0 site on PHP 7.4 or newer and administrator access.

1. Get a publishable key

In the BookDinePlay console open Venue → API keys and create a key of type Publishable. Add your site's address as an allowed origin, for example https://www.your-venue.example. The plugin puts this key into your public pages, so it must be a publishable one; a secret key is refused.

2. Install the plugin

  1. Download bookdineplay-<version>.zip from the latest GitHub release.
  2. In wp-admin choose Plugins → Add New → Upload Plugin, select the zip, Install Now, then Activate.
  3. Open Settings → BookDinePlay, paste the publishable key and save.

3. Add the shortcode

Edit any page, add a Shortcode block and paste:

[bookdineplay_widget venue="your-venue" types="RestaurantTable,BilliardTable,DartBoard"]

Publish the page and open it. The booking form appears where you placed the block. To try it before you have a venue, use the slug demo-sportsbar; it is also the plugin's default.

Four more shortcodes use the same key: [bookdineplay_events] for a venue's events, [bookdineplay_event] for one event on its own page, [bookdineplay_vouchers] for the gift voucher shop and [bookdineplay_specials] for today's specials. WordPress plugin lists their attributes.

Check that it worked

Make a test booking on the page, then open the console: the reservation is in the list with the reference the widget showed. Cancel it there.

If it does not work

  • Administrators see a notice about a missing key. Settings → BookDinePlay has no key, or the key attribute is not a bdp_pk_ value. Visitors see nothing until it is fixed.
  • The form is blank and the browser console shows 403 origin-not-allowed. The site's origin is not on the key's list. Check https against http and www against none: they are different origins.
  • A caching or optimisation plugin removes the script. Exclude cdn.bookdineplay.com from script minification and deferral for that page.

Next steps