Filter
rpress_reservation_last_seating_offset
On this page
Filters how long before closing the last reservation slot may start.
Used in rpress_reservation_get_slots() to work out the latest slot start as closing time minus this offset. The default is one slot interval, so the last slot starts one interval before closing. Return a number of seconds; a larger value ends bookings earlier, for example to leave time for a full meal.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$step | int | Default offset in seconds, equal to the slot interval. |
$date | string | Date being calculated (Y-m-d). |
Return value#
int. Offset in seconds subtracted from the closing time.
Example#
function my_reservation_last_seating( $offset, $date ) {
return 90 * MINUTE_IN_SECONDS;
}
add_filter( 'rpress_reservation_last_seating_offset', 'my_reservation_last_seating', 10, 2 );
Notes#
The result is cast to int.
Source#
Applied in:
includes/features/reservations/functions.php(line 244), inrpress_reservation_get_slots()
See also#
Was this page helpful?
