Skip to content
Docs
Get RestroPress

Filter

rpress_purchase_receipt

Updated
On this page

Filters the final customer receipt body before email tags are replaced.

Runs last in rpress_get_email_body_content, after the template specific rpress_purchase_receipt_{$template} filter. The body is the saved email content for the order status, or the built-in default body, and still contains email tags that are replaced afterwards.

Parameters#

ParameterTypeDescription
$email_bodystringReceipt body, possibly with wpautop applied.
$payment_idintID of the order.
$payment_dataarrayOrder meta from _rpress_payment_meta.

Return value#

string. The receipt body.

Example#

function my_purchase_receipt( $email_body, $payment_id, $payment_data ) {
	return $email_body . '<p>{store_address}</p>';
}
add_filter( 'rpress_purchase_receipt', 'my_purchase_receipt', 10, 3 );

Source#

Applied in:

  • includes/emails/template.php (line 214), in rpress_get_email_body_content()

See also#

Was this page helpful?