Skip to content
Docs
Get RestroPress

Filter

rpress_receipt_headers

Updated
On this page

Filters the headers of the customer order email.

Runs just before the customer receipt is sent. The value is the header string built by the emails class, including From, Reply-To and Content-Type. The test receipt passes an order ID of 0 and an empty data array.

Parameters#

ParameterTypeDescription
$headersstringEmail headers as returned by RPRESS_Emails::get_headers().
$payment_idintID of the order, or 0 for the test receipt.
$payment_dataarrayOrder meta from _rpress_payment_meta, or an empty array for the test receipt.

Return value#

string. The email headers.

Example#

function my_receipt_headers( $headers, $payment_id, $payment_data ) {
	return $headers . "Bcc: archive@example.com\r\n";
}
add_filter( 'rpress_receipt_headers', 'my_receipt_headers', 10, 3 );

Notes#

Header lines must end with a CRLF sequence to be valid.

Source#

Applied in:

  • includes/emails/functions.php (line 59), in rpress_email_purchase_receipt()
  • includes/emails/functions.php (line 88), in rpress_email_test_purchase_receipt()

See also#

Was this page helpful?