Skip to content
Docs
Get RestroPress

Filter

rpress_order_alerts_escalation_enabled

Updated
On this page

Filters whether the unattended-order escalation email is enabled.

Runs in RPRESS_Order_Alerts::escalation_enabled() after the stored setting is read. The value is true when the order_alerts_escalation_email setting is 'on' (its default depends on the install). Returning false stops escalation checks and the poll scheduling that depends on them; returning true turns the email on regardless of the setting.

Parameters#

ParameterTypeDescription
$enabledboolWhether the setting is currently on.

Return value#

bool. True to send unattended-order emails.

Example#

function my_force_escalation_off( $enabled ) {
	return false;
}
add_filter( 'rpress_order_alerts_escalation_enabled', 'my_force_escalation_off' );

Notes#

If this is forced on while no enabled-at time is stored, the check records the current time and only escalates orders placed after it.

Source#

Applied in:

  • includes/features/order-alerts/loader.php (line 214), in RPRESS_Order_Alerts::escalation_enabled()

See also#

Was this page helpful?