Skip to content
Docs
Get RestroPress

Filter

rpress_purchase_heading

Updated
On this page

Filters the heading shown at the top of the customer order email.

Runs after the heading is read from the email settings for the order status (or the purchase_heading option for pending orders). Email tags in the heading are replaced after this filter runs. The test receipt passes an order ID of 0 and an empty data array.

Parameters#

ParameterTypeDescription
$headingstringHeading text, which may contain email tags.
$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 heading text.

Example#

function my_purchase_heading( $heading, $payment_id, $payment_data ) {
	return $heading . ' - {order_id}';
}
add_filter( 'rpress_purchase_heading', 'my_purchase_heading', 10, 3 );

Source#

Applied in:

  • includes/emails/functions.php (line 51), in rpress_email_purchase_receipt()
  • includes/emails/functions.php (line 81), in rpress_email_test_purchase_receipt()

See also#

Was this page helpful?