Filter
rpress_email_from_address
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#
| Parameter | Type | Description |
|---|---|---|
$from_address | string | The sender email address. |
$emails | RPRESS_Emails | The 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), inRPRESS_Emails::get_from_address()
See also#
Was this page helpful?
