Filter
rpress_service_hours_available_dates
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#
| Parameter | Type | Description |
|---|---|---|
$dates | string[] | Available dates (Y-m-d). |
$service | string | Service type, or an empty string. |
$days | int | Number 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), inRPRESS_Service_Hours::get_available_dates()
See also#
Was this page helpful?
