Hello @richardzed,
Thanks for contacting us,
I hope you are doing well, We’ve informed our technical team about your issue, and they will work on it promptly. When we receive their response, we will get back to you. Our team is here to assist you.
Thanks & Regards
WP Experts Support Team
Hello @richardzed,
Please add this snippet of code in functions.php file of the active child theme.
You can change the login URL from the user approval email by this code.
Here is the code:
//Changing user login url from the user approval email
add_filter('nua_email_tags', 'nua_change_login_tags');
function nua_change_login_tags($email_tags) {
$function = $email_tags[5]['function'] = 'nua_custom_login_url';
$email_tags[5]['function'] = $function;
return $email_tags;
}
function nua_custom_login_url ($attributes) {
if( !empty($attributes) && isset($attributes['context']) && $attributes['context'] === 'approve_user') {
$custom_login_url = ''; // add your custom login url here, for example 'www.customLoginUrl.com'
return $custom_login_url;
}
}
If you have any questions, feel free to reach out. We’re here to assist you.
Thank you
Hi
Thank you for your support and the code. If I eventually would like changing the whole email text and removing all the link how can I do it?
Hello @richardzed,
Yes, you can override pre-defined email text with your custom email text by using this code in functions.php file of the active child theme.
// changing the user approve email
add_filter('new_user_approve_approve_user_message', 'nua_change_user_approval_email', 10,2);
function nua_change_user_approval_email($message, $user) {
$message = ""; // write your custom email message inside the "";
return $message;
}
If you have any questions, feel free to reach out. We’re here to assist you.
Thank you