Created
November 13, 2020 03:12
-
-
Save w33zy/11b04a4c6802e721a461e97e867d5c0d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 = $meessage . '<br>'; | |
$extra_field = get_user_meta( $user->user_id, 'my_extra_field_name', true ); | |
$_message = sprintf( '<p>%s</p>', $extra_field ); | |
return $_message; | |
} | |
add_filter( 'wcmo_new_registration_email_content', 'prefix_new_registration_email_content', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is helpful. Any other way to add the $user info to 'print'? I can't make it work.