Skip to content
Docs
Get RestroPress

Filter

rpress_sale_notification

Updated
On this page

Filters the body of the admin order notification email.

Runs at the end of rpress_get_order_notification_body_content. By this point email tags have already been replaced and wpautop has been applied if enabled. The body comes from the admin notification settings or the built-in default text.

Parameters#

ParameterTypeDescription
$email_bodystringNotification body with email tags already replaced.
$payment_idintID of the order.
$payment_dataarrayOrder meta passed to the admin notice.

Return value#

string. The notification body.

Example#

function my_sale_notification( $email_body, $payment_id, $payment_data ) {
	return $email_body . '<p>' . esc_html__( 'Check the kitchen display.', 'my-plugin' ) . '</p>';
}
add_filter( 'rpress_sale_notification', 'my_sale_notification', 10, 3 );

Source#

Applied in:

  • includes/emails/template.php (line 257), in rpress_get_order_notification_body_content()

See also#

Was this page helpful?