Use this wcmo_new_registration_email_content
to filter the content of the email sent to the site admin when a user needs to be approved.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter the content of the new user registration email | |
* @param $message The email content | |
* @param $user The user object | |
* @param $blogname The name of the site | |
* @param $url The url for the user profile | |
*/ | |
function prefix_new_registration_email_content( $message, $user, $blogname, $url ) { | |
$message = sprintf( | |
'<p>%s</p>', | |
'My new message goes here' | |
); | |
// Use the parameters to include extra information | |
$message = sprintf( | |
'<p>%s: <a href="%s">%s</a></p>', | |
'Follow the link to review the user', | |
$url, | |
'Click here' | |
); | |
return $message; | |
} | |
add_filter( 'wcmo_new_registration_email_content', 'prefix_new_registration_email_content', 10, 4 ); |
Here’s how to add a snippet.