Skip to content
Docs
Get RestroPress

Filter

rpress_pause_orders_durations

Updated
On this page

Filters the pause durations offered, in minutes.

Runs in RPRESS_Pause_Orders::pause_durations(). The default is 15, 30, 60 and 0, where 0 means paused until resumed. Every value is passed through absint(), so negative numbers become positive.

Parameters#

ParameterTypeDescription
$valueint[]Allowed durations in minutes.

Return value#

int[]. Allowed pause durations; 0 means until resumed.

Example#

function my_pause_durations( $durations ) {
	return array( 10, 20, 45, 120, 0 );
}
add_filter( 'rpress_pause_orders_durations', 'my_pause_durations' );

Source#

Applied in:

  • includes/features/pause-orders/loader.php (line 145), in RPRESS_Pause_Orders::pause_durations()

See also#

Was this page helpful?