Action
rpress_pause_orders_changed
On this page
Fires after the pause or busy state of the store has been saved.
Runs at the end of RPRESS_Pause_Orders::save_state(), which is called when orders are paused or resumed, extra prep time is set or cleared, and when an expired pause or busy period is cleaned up on read. The state array contains paused (bool), until (Unix time, 0 for until resumed), extra_prep (extra minutes) and extra_until (Unix time busy mode ends). The option is deleted when nothing is paused or busy.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$state | array | State with keys paused, until, extra_prep and extra_until. |
Example#
function my_on_pause_changed( $state ) {
if ( $state['paused'] ) {
delete_transient( 'my_menu_cache' );
}
}
add_action( 'rpress_pause_orders_changed', 'my_on_pause_changed' );
Notes#
Can fire during a normal page request when an expiry is detected, not only from the admin.
Source#
Fired from:
includes/features/pause-orders/loader.php(line 136), inRPRESS_Pause_Orders::save_state()
See also#
Was this page helpful?
