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
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!
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
Great! Thanks so much ๐
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
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.
Hi @floortjahh,
We have to check this and we will keep you updated on this.
Thank you
Thanks! I’m very grateful.
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
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
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.
Hi @floortjahh,
We are resolving this thread due to lack of activity if you have any questions please open a new thread.
Thank you