• when a user register he gets an email with the user name and password…
    how can i add text to that email?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter shaye

    (@shaye)

    i just ended up using register plus.
    thanks

    I had the same problem, what I do is something like:

    // Add filter for registration email body
    add_filter('wp_mail','handle_wp_mail');
    
    function handle_wp_mail($atts) {
        /*"Your username and password" is the subject of the Email WordPress send from "function wp_new_user_notification" in file "wp-includes/pluggable.php"*/
    
        if (isset ($atts ['subject']) && substr_count($atts ['subject'],'Your username and password')>0 ) {
    	if (isset($atts['message'])) {
    	   $atts['message'] = 'new body';
    	}
        }
        return ($atts);
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to change registration email content’ is closed to new replies.