Skip to content
Docs
Get RestroPress

Filter

rpress_admin_order_notification_headers

Updated
On this page

Filters the headers of the admin order notification email.

Runs just before the admin notification is sent. The value is the header string built by the emails class, including From, Reply-To and Content-Type.

Parameters#

ParameterTypeDescription
$headersstringEmail headers as returned by RPRESS_Emails::get_headers().
$payment_idintID of the order.
$payment_dataarrayOrder meta passed to the admin notice.

Return value#

string. The email headers.

Example#

function my_admin_notification_headers( $headers, $payment_id, $payment_data ) {
	return $headers . "Cc: manager@example.com\r\n";
}
add_filter( 'rpress_admin_order_notification_headers', 'my_admin_notification_headers', 10, 3 );

Notes#

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

Source#

Applied in:

  • includes/emails/functions.php (line 140), in rpress_admin_email_notice()

See also#

Was this page helpful?