• Resolved Florence

    (@floortjahh)


    Hi there! Loving your plugin so far. Quick question: How can I edit the text of the following email + it’s subject line?

    Hello,

    Thank you for registering on our site. We have successfully received your request and is currently pending for approval.
    The administrator will review the information that has been submitted after which they will either approve or deny your request. You will receive an email with the instructions on what you will need to do next.

    Thank You

    I have a second question. How would I go about adding a link? I’m a novice and can’t figure it out.

    add_filter('new_user_approve_approve_user_message', function($message, $user) {
    	$new_message = "";
    	
    	$username = $user->data->user_login;
        $new_message .= "Beste " . $username;
    	$new_message .= ",";
    	$new_message .= "\n\n";
        $new_message .= "Je bent toegevoegd als auteur en kunt nu zelf recepten aan de Cooking Blondes website toevoegen ";	
    	$new_message .= "\n\n";
    	$new_message .="MY LINK HERE ";
    	$new_message .= "\n\n";
    	$new_message .= "Hartelijk dank,";
    	$new_message .= "\n\n";
    	$new_message .= "De Cooking Blondes redactie";
    	return $new_message;	
    }, 10, 2);

    Many thanks!

    • This topic was modified 3 years, 7 months ago by Florence.
    • This topic was modified 3 years, 7 months ago by Florence.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @floortjahh,

    Thanks for contacting us,

    I hope you are doing well, Can you please let me know you are using the PRO version or FREE version of our plugin?

    If you are using the PRO version of our plugin so kindly open a support ticket via our website as we are not allowed to provide support on paid versions through this platform.

    Thanks & Regards

    WP Experts Support Team

    Thread Starter Florence

    (@floortjahh)

    Hi there,

    Thanks for a quick reply ๐Ÿ™‚ I’m using the free version. I’m actually fine with the default text, except it is in the wrong language.

    I tried this code but it isn’t working.

    add_filter('new_user_approve_pending_message', function($message, $user) {
    	$new_message = "";
    	
    	$username = $user->data->user_login;
        	$new_message .= "Beste " . $username;
    	$new_message .= "TESTING ";	
    	return $new_message;	
    
    }, 10, 2);

    Thanks!

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @floortjahh,

    Thanks for getting back to me, we have forwarded this to our technical team we will get back to you once we get a response from them.

    Thank you

    Thread Starter Florence

    (@floortjahh)

    Great! Thanks so much ๐Ÿ™‚

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @floortjahh,

    How can I edit the text of the following email + itโ€™s subject line?

    Add this code snippet in the theme’s functions.php file.

    add_filter('new_user_approve_welcome_user_message', 'new_user_approve_welcome_user_message_callback', 10, 2);
    
    function new_user_approve_welcome_user_message_callback($message, $user_email) {
    	$new_message = "Je bent toegevoegd als auteur en kunt nu zelf recepten aan de Cooking Blondes website toevoegen";
    	return $new_message;	
    }
    
    add_filter('new_user_approve_welcome_user_subject', 'new_user_approve_welcome_user_subject_callback', 10);
    
    function new_user_approve_welcome_user_subject_callback($subject) {
    	$subject = "Test";
    	return $subject;	
    }

    How would I go about adding a link? Iโ€™m a novice and canโ€™t figure it out.

    Also, add this code snippet in the theme’s functions.php file.

    add_filter('new_user_approve_approve_user_message', function($message, $user) {
    	$new_message = "";
    	$link = "https://wordpress.org/plugins/new-user-approve/";
    	$username = $user->data->user_login;
        $new_message .= "Beste " . $username;
    	$new_message .= ",";
    	$new_message .= "\n\n";
        $new_message .= "Je bent toegevoegd als auteur en kunt nu zelf recepten aan de Cooking Blondes website toevoegen ";	
    	$new_message .= "\n\n";
    	$new_message .="<a href='". $link . "'>Click here</a> ";
    	$new_message .= "\n\n";
    	$new_message .= "Hartelijk dank,";
    	$new_message .= "\n\n";
    	$new_message .= "De Cooking Blondes redactie";
    	return $new_message;	
    }, 10, 2);

    Please check it and let me know.

    Thank you

    Thread Starter Florence

    (@floortjahh)

    Hi @hamza1010

    Thanks again for all the help. The solution for my first question works perfectly!

    Unfortunately adding the link did not work. The email came out like this, with href written out, instead of just a clickable text:

    Beste test,
    
    Je bent toegevoegd als auteur en kunt nu zelf recepten aan de Cooking Blondes website toevoegen
    
    <a href='https://wordpress.org/plugins/new-user-approve/'>Click here</a>

    A secondary question to add on: if I were to add a second or third link, would I just add terms like this?

    $link = "https://wordpress.org/plugins/new-user-approve/";
    $link2 = "https://wordpress.org/plugins/new-user-approve/";
    $link3 = "https://wordpress.org/plugins/new-user-approve/";
    • This reply was modified 3 years, 7 months ago by Florence.
    • This reply was modified 3 years, 7 months ago by Florence.
    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @floortjahh,

    We have to check this and we will keep you updated on this.

    Thank you

    Thread Starter Florence

    (@floortjahh)

    Thanks! I’m very grateful.

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @floortjahh,

    Please add this code and set your own links. An email will send as HTML.

    // new user approve mail message
    add_filter('new_user_approve_approve_user_message', function($message, $user) {
    	
    	add_filter('wp_mail_content_type', function ($content_type) {
    		 $content_type = 'text/html';
             return $content_type;
    	});
    	//message start
    	$new_message = "";
    	
    	//links
    	$link = "https://wordpress.org/plugins/new-user-approve/";
    	$link2 = "https://wordpress.org/plugins/new-user-approve/";
    	$link3 = "https://wordpress.org/plugins/new-user-approve/";
    	
    	$username = $user->data->user_login;
        $new_message .= "Beste " . $username;
    	$new_message .= ",";
    	$new_message .= "\n\n";
        $new_message .= "Je bent toegevoegd als auteur en kunt nu zelf recepten aan de Cooking Blondes website toevoegen ";	
    	$new_message .= "\n\n";
    	
    	//links adding to mail.
    	$new_message .="<a href='". $link . "'>Click here link1</a> ";
    	$new_message .="<a href='". $link2. "'>Click here link2</a> ";
    	$new_message .="<a href='". $link3. "'>Click here link3</a> ";
    	
    	$new_message .= "\n\n";
    	$new_message .= "Hartelijk dank,";
    	$new_message .= "\n\n";
    	$new_message .= "De Cooking Blondes redactie";
    	return $new_message;	
    }, 10, 2);

    Thank you

    Thread Starter Florence

    (@floortjahh)

    Hi!

    The links work now (great, thanks!)

    Unfortunately the line breaks stopped working, see: https://cookingblondes.com/wp-content/uploads/2022/09/Screenshot-2022-09-16-at-09.42.36.png

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @floortjahh,

    You will need to replace \n to <br> , please see the updated code.

    Updated code:

    // new user approve mail message
    add_filter('new_user_approve_approve_user_message', function($message, $user) {
    	
    	add_filter('wp_mail_content_type', function ($content_type) {
    		 $content_type = 'text/html';
             return $content_type;
    	});
    	//message start
    	$new_message = "";
    	
    	//links
    	$link = "https://wordpress.org/plugins/new-user-approve/";
    	$link2 = "https://wordpress.org/plugins/new-user-approve/";
    	$link3 = "https://wordpress.org/plugins/new-user-approve/";
    	
    	$username = $user->data->user_login;
        $new_message .= "Beste " . $username;
    	$new_message .= ",";
    	$new_message .= "<br>";
        $new_message .= "Je bent toegevoegd als auteur en kunt nu zelf recepten aan de Cooking Blondes website toevoegen ";	
    	
    	//links adding to mail.
    	$new_message .= "<br>";
    	$new_message .="<a href='". $link . "'>Click here link1</a> ";
    	$new_message .= "<br>";
    	$new_message .="<a href='". $link2. "'>Click here link2</a> ";
    	$new_message .= "<br>";
    	$new_message .="<a href='". $link3. "'>Click here link3</a> ";
    	$new_message .= "<br>";
    	
    	
    	$new_message .= "Hartelijk dank,";
    	$new_message .= "<br>";
    	$new_message .= "De Cooking Blondes redactie";
    	return $new_message;	
    }, 10, 2);

    Thank you

    • This reply was modified 3 years, 7 months ago by Mirza Hamza.
    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @floortjahh,

    We are resolving this thread due to lack of activity if you have any questions please open a new thread.

    Thank you

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Edit registration message’ is closed to new replies.