Skip to content
Docs
Get RestroPress

Filter

rpress_command_center_thresholds

Updated
On this page

Filters the operational thresholds that drive Command Center, Orders and report alerts.

Returns the array of numeric limits used by the Command Center health states, the live orders view, the Orders list and the Reports intelligence screen. Override individual keys to suit your kitchen. Keys: due_soon_minutes, ready_waiting_minutes, asap_prep_minutes, processing_overload, late_critical, needs_action_critical, needs_action_risk, active_risk, active_busy and high_value_multiplier.

Parameters#

ParameterTypeDescription
$thresholdsarrayThreshold values. Defaults: due_soon_minutes 15, ready_waiting_minutes 10, asap_prep_minutes 30, processing_overload 6, late_critical 3, needs_action_critical 8, needs_action_risk 4, active_risk 10, active_busy 5, high_value_multiplier 1.5.

Return value#

array. The threshold array. Keep all keys present.

Example#

function my_command_center_thresholds( $thresholds ) {
	$thresholds['due_soon_minutes']      = 20;
	$thresholds['ready_waiting_minutes'] = 5;
	$thresholds['asap_prep_minutes']     = 45;
	return $thresholds;
}
add_filter( 'rpress_command_center_thresholds', 'my_command_center_thresholds' );

Notes#

Command Center data is cached, so a changed value may take a refresh or cache flush to show. asap_prep_minutes is also used to decide when an ASAP order is considered late.

Source#

Applied in:

  • includes/admin/dashboard/class-rpress-command-center-dashboard.php (line 42), in RPRESS_Command_Center_Dashboard::thresholds()

See also#

Was this page helpful?