Skip to content
Docs
Get RestroPress

Filter

rpress_email_from_address

Updated
On this page

Filters the From address used for RestroPress emails.

Applied in RPRESS_Emails::get_from_address(). If the stored address is empty or not a valid email, the site admin_email option is used before the filter runs. The value is used in the From and Reply-To headers and as the wp_mail_from value while an email is being sent.

Parameters#

ParameterTypeDescription
$from_addressstringThe sender email address.
$emailsRPRESS_EmailsThe RPRESS_Emails instance sending the email.

Return value#

string. The sender email address.

Example#

function my_email_from_address( $from_address, $emails ) {
	return 'orders@example.com';
}
add_filter( 'rpress_email_from_address', 'my_email_from_address', 10, 2 );

Source#

Applied in:

  • includes/emails/class-rpress-emails.php (line 144), in RPRESS_Emails::get_from_address()

See also#

Was this page helpful?