Skip to content
Docs
Get RestroPress

Filter

rpress_purchase_from_address

Updated
On this page

Filters the sender email address used in the customer order receipt.

Runs in rpress_email_purchase_receipt after the From Email setting (from_email) is read, falling back to the site admin email. The result becomes the From address of the customer email.

Parameters#

ParameterTypeDescription
$from_emailstringSender email address.
$payment_idintID of the order.
$payment_dataarrayOrder meta from _rpress_payment_meta.

Return value#

string. The sender email address to use.

Example#

function my_purchase_from_address( $from_email, $payment_id, $payment_data ) {
	return 'orders@example.com';
}
add_filter( 'rpress_purchase_from_address', 'my_purchase_from_address', 10, 3 );

Source#

Applied in:

  • includes/emails/functions.php (line 36), in rpress_email_purchase_receipt()

See also#

Was this page helpful?