You can only reliably prevent double bookings for WooCommerce collection slots if the server reserves capacity atomically. A browser that first sees “one space left” and saves an order later is not enough: two customers may select the same last space simultaneously. Use temporary checkout reservations, fixed capacity per window and a controlled conversion into the final order.
This makes a time slot a managed operational appointment, rather than a decorative order field.
Define the collection model first
Record what capacity means. Does one reservation equal one order, one customer, a number of products or expected handling time? Capacity per order is sufficient for many processes, but large or configured orders may require more room. Choose a model employees can explain and manage.
Also describe:
- which collection locations exist;
- on which weekdays and at what times each location opens;
- how long each window lasts;
- how many reservations are allowed per window;
- how much preparation time is needed;
- when a day or window may be closed manually.
Include the location in the key. “Friday 14:00” can exist at two locations at once and must not technically be the same time slot.
Use temporary reservations during checkout
As soon as a customer selects an available window, the server temporarily reserves a space. That reservation counts towards availability for other customers. When the customer completes the order, it is permanently linked to that order. If the customer leaves checkout, the reservation expires after an appropriate period.
A good hold has four characteristics:
- it is linked to an unguessable checkout identity;
- it has a clear expiry time;
- the same checkout can extend or replace its own reservation;
- releasing it remains safe if the request runs twice.
The sequence matters when changing windows. Do not reserve unlimited spaces for the same checkout, but also avoid losing the old space before confirming that the new one is available.
Handle concurrency in the database
Suppose a window has one space left and three customers book simultaneously. All three may see “available” based on a separate read check. The actual reservation must therefore recount within a transaction and lock the relevant capacity. Only one transaction may succeed.
Test this explicitly with simultaneous requests. A sequential functional test will miss the problem because customers neatly book one at a time.
Recalculate availability when an order changes
A customer or employee may request a different collection time after purchase. Recheck that the new window exists, is not closed, is after the cut-off and has capacity. Only record the change once the new reservation is confirmed, then release the old capacity.
Allow changes only while the operational status permits them. An order that is already prepared or included in a final work schedule may require manual assessment. The server remains authoritative; hiding a button in the interface is not access control.
Keep exceptions visible
If the planning function is temporarily unavailable, checkout can either block or accept the order without a final window. Make a deliberate choice based on the service. A fallback must create a clear task for manual planning, with customer communication that does not promise an unconfirmed time slot.
Expired or conflicting reservations also deserve an understandable response. Let customers choose current alternatives rather than displaying a general error message.
Collection flow checklist
- Location, date and window together form a unique appointment.
- Capacity is an explicit business rule.
- Checkout creates a short server-side reservation.
- Abandoned checkouts automatically release capacity.
- Simultaneous bookings cannot exceed the limit.
- Cut-offs and closed days also apply to changes.
- A final order demonstrably takes over the checkout reservation.
- Administrators can see full windows, open holds and exceptions.
- Fallback orders are marked as concrete follow-up tasks.
Connect the window to the rest of the process
The chosen time should appear beyond the WooCommerce thank-you page. AFAS, the warehouse or an operational planning system must receive the same appointment. Customer service needs to see the current status and initiate permitted changes in a controlled way.
Use one authoritative representation and consistently update derived order fields. Identify collection by the technical shipping method, not visible text that may later be translated or changed.
The ForaVida case study covers the relationship between sales, accounting and planning. Yindle Connect handles validation and transfer between the systems involved. For more on recoverable integrations, read reliably integrating an online store and ERP.
Frequently asked questions about capacity
Can WooCommerce stock manage the number of time slots?
Product stock and operational capacity are different concepts. An order may contain several products but use one collection appointment. Model capacity per location and window. Link it to the order so cancellation or a change releases the correct space.
How long should a checkout reservation last?
Long enough for a realistic payment process, but not so long that abandoned checkouts block planning. Base the duration on the actual payment path and monitor how many holds expire. Do not allow a returning customer to unknowingly accumulate multiple active reservations.
What if an employee reduces capacity?
First check how many final orders and active holds already exist. A lower limit must not silently invalidate existing appointments. Show the conflict, block new bookings and have an authorised employee decide which existing orders may need rescheduling.
Make planning testable
Alongside functional tests, run a concurrency test in which more customers request the same final window than the remaining capacity allows. Check that exactly the permitted number succeed, the other customers receive current alternatives and no phantom reservations remain. Repeat the test around expiry time and with a manually closed window.
For administration, retain only the necessary reservation identity, location, window, status and relevant times. This keeps the process investigable without unnecessarily copying checkout data.
Want to offer collection without employees having to resolve overbookings afterwards? Have Yindle develop your time-slot and capacity process.