Skip to content
Docs
Get RestroPress

Filter

rp_store_time_interval

Updated
On this page

Filters the interval, in minutes, between order time slots.

Used when the list of store timings is generated. The default is the Order time slot interval (minutes) setting, falling back to 30. The value is multiplied by 60 to get seconds, so it must be a positive number of minutes.

Parameters#

ParameterTypeDescription
$default_intervalstringInterval in minutes.
$service_typestring|nullService slug the timings are built for.

Return value#

int|string. Interval in minutes; must be greater than zero.

Example#

function my_slot_interval( $interval, $service_type ) {
	return 'delivery' === $service_type ? 45 : $interval;
}
add_filter( 'rp_store_time_interval', 'my_slot_interval', 10, 2 );

Source#

Applied in:

  • includes/rp-core-functions.php (line 595), in rp_get_store_timings()

See also#

Was this page helpful?