Filter
rpress_reservation_send_email
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#
| Parameter | Type | Description |
|---|---|---|
$value | bool | Whether to send. |
$type | string | Email type: received, confirmed, declined, reminder or admin. |
$res | array | Reservation 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), inrpress_reservation_send_email()
See also#
Was this page helpful?
