Skip to content
Docs
Get RestroPress

Action

rpress_reservation_email_sent

Updated
On this page

Fires after a reservation email has been handed to the mailer.

Runs at the end of rpress_reservation_send_email(), after the message has been sent and the temporary heading, headers and footer filters have been removed. $sent is the result of the mail send, so it can be used to log delivery failures. It does not fire when the send is cancelled earlier, for example when there is no recipient or the rpress_reservation_send_email filter returns false.

Parameters#

ParameterTypeDescription
$idintReservation ID.
$typestringEmail type: received, confirmed, declined, reminder or admin.
$sentboolWhether the email was sent successfully.

Example#

function my_log_reservation_email( $id, $type, $sent ) {
	if ( ! $sent ) {
		error_log( sprintf( 'Reservation %d: %s email failed to send.', $id, $type ) );
	}
}
add_action( 'rpress_reservation_email_sent', 'my_log_reservation_email', 10, 3 );

Source#

Fired from:

  • includes/features/reservations/emails.php (line 140), in rpress_reservation_send_email()

See also#

Was this page helpful?