Skip to content
Docs
Get RestroPress

Action

rpress_order_alerts_escalated

Updated
On this page

Fires after an unattended order was escalated.

Runs in RPRESS_Order_Alerts::run_escalation_check() for each order that was flagged and for which an escalation email attempt was made. The order is already marked as escalated and a payment note has been added, so it will not be escalated again. Use it to send a push message, SMS or webhook alongside the email.

Available since RestroPress 3.5.

Parameters#

ParameterTypeDescription
$order_idintOrder (payment) ID.
$okboolWhether the email was sent.
$minutesintEscalation window in minutes.

Example#

function my_on_order_escalated( $order_id, $ok, $minutes ) {
	if ( ! $ok ) {
		error_log( sprintf( 'Escalation email failed for order %d after %d minutes.', $order_id, $minutes ) );
	}
}
add_action( 'rpress_order_alerts_escalated', 'my_on_order_escalated', 10, 3 );

Source#

Fired from:

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

See also#

Was this page helpful?