Skip to content
Docs
Get RestroPress

Filter

rpress_status_change_force_reload

Updated
On this page

Filters whether the order status change forces a full page reload.

Runs in RP_AJAX::update_order_status() after the status has been updated through the admin AJAX request. The default is false and the admin script updates the order row in place. Return true if an extension depends on server-rendered changes that need a reload.

Available since RestroPress 3.3.

Parameters#

ParameterTypeDescription
$force_reloadboolWhether to force a page reload. Default false.
$payment_idintThe order ID being updated.
$statusstringThe new status slug.

Return value#

bool. True to force a full page reload.

Example#

function my_status_force_reload( $force_reload, $payment_id, $status ) {
	return 'cancelled' === $status ? true : $force_reload;
}
add_filter( 'rpress_status_change_force_reload', 'my_status_force_reload', 10, 3 );

Notes#

Not reached when the request includes a redirect query argument; that path redirects before the filter.

Source#

Applied in:

  • includes/class-rpress-ajax.php (line 423), in RP_AJAX::update_order_status()
Was this page helpful?