• Hi,

    I am using WordPress Multisite. I want to modify the content of function welcome_user_msg_filter without hacking the core.

    I don’t like the content of mail which goes to the user after activation. i.e.,

    ” Howdy USERNAME,

    Your new account is set up.

    You can log in with the following information:
    Username: USERNAME
    Password: PASSWORD
    LOGINLINK

    Thanks!

    –The Team @ SITE_NAME “

    I even checked with custom Welcome mail plugin but of no use.

    Please confirm how can I modify the content and customize this mail

Viewing 1 replies (of 1 total)
  • Hi, I was able to change the message with this piece of code:

    add_filter( 'update_welcome_user_email', function( $welcome_email, $user_id, $password, $meta ) {
    
    	$user = get_userdata( $user_id );
    
    	$welcome_email = 'Hi<br /><br />Your account has been created.<br /><br />You can login with the following info:<br />Username: '. $user->user_login .'<br />Password: '. $password .'<br />'. wp_login_url();
    
    	return $welcome_email;
    
    }, 10, 4 );

    It uses an anonymous function. You might want to use a named function if your using older versions of PHP.
    Also, if you email does not accept HTML, then you’ll need to remove any html tags in the message.

Viewing 1 replies (of 1 total)
  • The topic ‘How to modify content of function welcome_user_msg_filter’ is closed to new replies.