Skip to content
Docs
Get RestroPress

Filter

rpress_test_purchase_from_address

Updated
On this page

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

Runs in rpress_email_test_purchase_receipt after the From Email setting (from_email) is read, falling back to the site admin email. It is separate from the filter used for real receipts. The order ID passed is always 0 and the data is an empty array.

Parameters#

ParameterTypeDescription
$from_emailstringSender email address.
$payment_idintAlways 0 for the test receipt.
$payment_dataarrayAlways an empty array for the test receipt.

Return value#

string. The sender email address to use.

Example#

function my_test_purchase_from_address( $from_email, $payment_id, $payment_data ) {
	return 'test-orders@example.com';
}
add_filter( 'rpress_test_purchase_from_address', 'my_test_purchase_from_address', 10, 3 );

Source#

Applied in:

  • includes/emails/functions.php (line 76), in rpress_email_test_purchase_receipt()

See also#

Was this page helpful?