Filter
rpress_reservation_email_headers
On this page
Filters the email headers used for a reservation email.
Runs in rpress_reservation_send_email() after the default headers are built from the configured From name and From email. For the admin notification the Reply-To header has already been replaced with the guest's email address. The returned string is set as the headers of the RPRESS()->emails object just before the message is sent.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$headers | string | Header block built by the email object, one header per line. |
$type | string | Email type: received, confirmed, declined, reminder or admin. |
$res | array | Reservation as returned by rpress_get_reservation(). |
Return value#
string. The header block to send with the email.
Example#
function my_reservation_email_bcc( $headers, $type, $res ) {
if ( 'confirmed' === $type ) {
$headers .= "Bcc: host@example.com\r\n";
}
return $headers;
}
add_filter( 'rpress_reservation_email_headers', 'my_reservation_email_bcc', 10, 3 );
Notes#
Header lines in the default block are separated by line breaks; keep that format when appending.
Source#
Applied in:
includes/features/reservations/emails.php(line 130), inrpress_reservation_send_email()
See also#
Was this page helpful?
