Skip to main content

Hold Spaces While Booking

When an event is close to selling out, two visitors can pick the last spaces at the same moment, and the slower one gets an error when they submit. With holds switched on, the spaces a visitor picks on the booking form are set aside for them for a few minutes, so nobody else can take them before the form is submitted. Since 7.5

Holds are off by default. They are most useful for events with limited capacity, paid tickets or a long booking form.

Before you start

Holds work on any event that takes bookings. A hold can never be larger than one booking, so if you want to stop one visitor setting aside a large part of an event, give your events a Maximum Spaces Per Booking or give tickets an At most limit first. Both are described in Set Up Event Bookings.

Turn on holds​

  1. Go to Events then Settings then Bookings then General Options.

  2. Set Hold spaces while booking? to Yes. Two more settings appear below it.

    The two hold settings appear once holds are switched on.

  3. Set Hold time to the number of minutes a visitor gets to finish the form. The default is 15.

  4. Set Most of an event held at once (%) to the largest share of an event that unfinished bookings may tie up. The default is 50.

  5. Click Save Changes (All).

SettingDefaultWhat it does
Hold spaces while booking?NoHolds the spaces a visitor picks on the booking form until they submit the booking or the hold time runs out.
Hold time15Minutes a hold lasts, counted from the moment the visitor first picks spaces. The shortest possible hold is one minute.
Most of an event held at once (%)50The largest share of an event's spaces that all visitors' holds together can take. Once it is reached, visitors can still book the remaining spaces, but those spaces are not held for them. Enter 100 for no limit.

What a hold is​

A hold starts when a visitor picks one or more spaces on the booking form, which is the same moment the booking summary updates. It is tied to that visitor's form.

  • Changing the number of spaces or switching tickets updates the hold. The deadline stays where it was: the clock doesn't restart.
  • Setting every ticket back to zero releases the hold straight away.
  • On a recurring event or an event with timeslots, choosing a different date or time releases the hold on the first one.
  • Submitting the form turns the hold into the booking. From then on it is a normal booking with the status your settings give it.

A hold is not a booking. It doesn't appear in the bookings table or in exports, it is not counted in booking totals, and no emails are sent for it.

What the visitor sees​

Once spaces are picked, a notice appears above the booking summary with a countdown:

Your spaces are held for 14:59 while you complete your booking.

The countdown sits above the booking summary and updates every second.

When the time runs out, the notice changes to:

Your hold on these spaces has ended. You can still book them while they are available.

The form stays as it is. The visitor can still submit it, and the booking goes through if the spaces are still free at that moment. If someone else has taken them in the meantime, the visitor sees the usual message for a booking that can't be made.

Two other messages can appear in the same place:

MessageWhen
These spaces cannot be held for you right now, but you can still book them while they are available.One of the limits below has been reached. The booking form works as it does with holds switched off.
Only 2 spaces are left for General Admission. (or The ticket 'General Admission' is no longer available.)The visitor asked for more spaces than are free right now, counting other visitors' holds.

How held spaces count against availability​

While a hold is running, its spaces count as taken for everyone except the visitor who holds them. This applies to the ticket's own spaces and to the event's total.

So an event with 3 spaces left and one visitor holding all 3 shows as fully booked to everyone else. If that visitor submits, the spaces are booked. If they leave, the spaces come back on sale when the hold time ends, with no action from you.

This means a popular event can switch between "fully booked" and "available" in its final spaces. If that happens more than you'd like, shorten the Hold time.

Limits on holds​

Three limits stop a visitor, or a script, from tying up an event without booking it. In every case the spaces can still be booked. They are not held, and the visitor is told so.

LimitDefaultHow it is counted
Share of one event50%All holds on an event together can take up to Most of an event held at once (%) of its spaces, rounded down, and always at least one space. On an event with 40 spaces, holds stop at 20.
Holds per visitor on one event1A visitor can have one hold on an event at a time. Opening the same booking form in a second tab doesn't create a second hold.
Events held per visitor2A visitor can hold spaces on two events at once. A third event is not held until one of the first two is booked or runs out.

Logged-in visitors are counted by their account. Guests are counted by IP address, so several guests on one network (an office or a school, for example) share the guest limits: the first one to pick spaces on an event gets the hold, and the others book without one.

Anyone who can manage the event's bookings is exempt from all three limits.

Change the per-visitor limits​

The per-visitor limits have no settings field. To change them, add any of these constants to wp-config.php. A value of 0 removes that limit.

wp-config.php
define( 'EM_BOOKING_EVENT_HOLDS_BY_USER', 1 ); // holds per logged-in user on one event
define( 'EM_BOOKING_HOLDS_BY_USER', 2 ); // events a logged-in user can hold at once
define( 'EM_BOOKING_EVENT_HOLDS_BY_IP', 1 ); // holds per guest IP address on one event
define( 'EM_BOOKING_HOLDS_BY_IP', 2 ); // events a guest IP address can hold at once

Developers can also use the em_booking_intent_limits filter for the same four values, em_bookings_hold_minutes to change the hold time per booking, and em_booking_intent_ip to supply the visitor's real IP address on a site behind a proxy.

How expired holds are cleaned up​

A hold stops counting against availability the second its time runs out. Nothing has to run for the spaces to be released.

The leftover record is removed afterwards by a scheduled task that runs once a minute through WP-Cron while holds are switched on. It deletes holds that expired more than 10 minutes ago, which leaves room for a visitor who submits right at the deadline. If WP-Cron is not running on your site, expired holds stay in the database longer, but they never hold spaces.

For a guest, the hold also stores a scrambled (hashed) form of their IP address so the per-visitor limits can be counted. The address itself is not stored, and the hashed value is deleted when the hold becomes a booking or is cleaned up.

Holds in a Multiple Bookings cart​

ProSince 3.10Cart holds need Events Manager Pro 3.10 or later with Multiple Bookings Mode enabled, and holds switched on as described above.

In Multiple Bookings Mode a visitor adds several events to a cart and checks out once. With holds on, each event in the cart keeps its spaces held until checkout turns the cart into bookings.

Choose how the deadline works with Cart Hold in Events then Settings then Bookings then Multiple Bookings Mode (Beta):

OptionWhat it does
Hold the whole cart until one deadline (default)Everything in the cart is held until the deadline set when the first event was added. Adding more events doesn't extend it.
Hold each event for its own timeEach event keeps the hold it was given when it was added, so events added later are held for longer.

The cart and checkout pages tell the visitor when the hold ends, for example Your cart is held for you until 3:45 pm. Removing an event from the cart, or emptying it, releases those spaces at once.

Two things to know:

  • The per-visitor limit of two held events applies to carts as well. A third event can be added to the cart, but its spaces are not held unless you raise EM_BOOKING_HOLDS_BY_USER and EM_BOOKING_HOLDS_BY_IP.
  • An event in the cart whose hold has ended is still booked at checkout if its spaces are free at that moment.

Troubleshooting​

The countdown doesn't appear on the booking form​

Check that Hold spaces while booking? is set to Yes and that at least one space is selected. If the visitor sees the message that the spaces cannot be held, one of the limits has been reached. Testing several bookings from one browser or one network is the usual cause: you already hold spaces on two other events, or another form on the same event.

An event shows as fully booked, but the bookings table has spaces left​

Other visitors are holding the remaining spaces. They are released when those visitors' hold time ends. Holds are not listed in the bookings table.

Guests in the same office or classroom don't get a hold​

Guests are counted by IP address, and people on one network usually share an address. Raise EM_BOOKING_EVENT_HOLDS_BY_IP and EM_BOOKING_HOLDS_BY_IP in wp-config.php, or ask those visitors to log in so they are counted by account.

A visitor sees "This booking has already been submitted."​

The same form was submitted twice, for example by double-clicking or reloading during submission. The first submission created the booking, so the second is refused.