Filter
rpress_email_message
On this page
Filters the final email message after it has been built.
Applied at the end of RPRESS_Emails::build_email(). In plain text mode the message is the body with HTML tags stripped. In HTML mode it is the header, body and footer templates with the message inserted in place of the {email} placeholder.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$message | string | The built email message. |
$emails | RPRESS_Emails | The RPRESS_Emails instance sending the email. |
Return value#
string. The final message.
Example#
function my_email_message( $message, $emails ) {
return $message . "\n\n" . 'Sent from my store.';
}
add_filter( 'rpress_email_message', 'my_email_message', 10, 2 );
Notes#
Fired from two places with the same signature: the plain text branch passes wp_strip_all_tags( $message ), and the HTML branch passes the full templated body.
Source#
Applied in:
includes/emails/class-rpress-emails.php(line 251), inRPRESS_Emails::build_email()includes/emails/class-rpress-emails.php(line 280), inRPRESS_Emails::build_email()
See also#
Was this page helpful?
