Skip to content
Docs
Get RestroPress

Filter

rpress_reservation_send_email

Updated
On this page

Filters whether a reservation email is sent.

Runs in rpress_reservation_send_email() after the recipient has been found, before the subject and body are built. Return false to suppress the email. The type is one of received, confirmed, declined, reminder or admin.

Parameters#

ParameterTypeDescription
$valueboolWhether to send.
$typestringEmail type: received, confirmed, declined, reminder or admin.
$resarrayReservation from rpress_get_reservation().

Return value#

bool. False to suppress the email.

Example#

function my_reservation_send_email( $send, $type, $res ) {
	if ( 'reminder' === $type && $res['party'] > 8 ) {
		return false;
	}
	return $send;
}
add_filter( 'rpress_reservation_send_email', 'my_reservation_send_email', 10, 3 );

Source#

Applied in:

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

See also#

Was this page helpful?