Filter
rpress_purchase_subject
On this page
Filters the subject line of the customer order email.
Runs after the subject is read from the email settings for the order status (or the purchase_subject option for pending orders) and stripped of tags. Email tags in the subject are replaced after this filter runs. The test receipt passes an order ID of 0.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$subject | string | Subject with HTML tags stripped. It may still contain email tags such as {order_id}. |
$payment_id | int | ID of the order, or 0 for the test receipt. |
Return value#
string. The subject line.
Example#
function my_purchase_subject( $subject, $payment_id ) {
return $subject . ' - ' . get_bloginfo( 'name' );
}
add_filter( 'rpress_purchase_subject', 'my_purchase_subject', 10, 2 );
Notes#
Email tags in the returned string are still replaced afterwards.
Source#
Applied in:
includes/emails/functions.php(line 45), inrpress_email_purchase_receipt()includes/emails/functions.php(line 78), inrpress_email_test_purchase_receipt()
See also#
Was this page helpful?
