Skip to content
Docs
Get RestroPress

Action

rpress_reservation_status_changed

Updated
On this page

Fires after a reservation status changes.

Runs in rpress_set_reservation_status() after the new status is stored; it does not run when the status is unchanged or invalid. Core uses it to send the customer emails and to reschedule the reminder. When $notify is false the caller asked for no customer emails.

Parameters#

ParameterTypeDescription
$idintReservation ID.
$statusstringNew status.
$oldstringPrevious status.
$notifyboolWhether customer emails should go out.

Example#

function my_reservation_status_changed( $id, $status, $old, $notify ) {
	if ( 'cancelled' === $status ) {
		error_log( sprintf( 'Reservation %d changed from %s to cancelled.', $id, $old ) );
	}
}
add_action( 'rpress_reservation_status_changed', 'my_reservation_status_changed', 10, 4 );

Notes#

Core callbacks run at priority 10 and 20.

Source#

Fired from:

  • includes/features/reservations/functions.php (line 654), in rpress_set_reservation_status()

See also#

Was this page helpful?