Skip to content
Docs
Get RestroPress

Filter

rpress_service_hours_available_dates

Updated
On this page

Filters the dates that have at least one bookable order slot.

Returned by RPRESS_Service_Hours::get_available_dates(). Without pre-orders the list is at most today, or the rollover date when ordering continues past midnight; with pre-orders it covers today and the following days up to the limit. Dates are strings in Y-m-d format.

Parameters#

ParameterTypeDescription
$datesstring[]Available dates (Y-m-d).
$servicestringService type, or an empty string.
$daysintNumber of days inspected, today included.

Return value#

string[]. The available dates (Y-m-d).

Example#

function my_service_hours_available_dates( $dates, $service, $days ) {
	return array_values( array_diff( $dates, array( '2026-12-25' ) ) );
}
add_filter( 'rpress_service_hours_available_dates', 'my_service_hours_available_dates', 10, 3 );

Source#

Applied in:

  • includes/features/slot-engine/class-rpress-service-hours.php (line 714), in RPRESS_Service_Hours::get_available_dates()

See also#

Was this page helpful?