• Resolved forprof

    (@forprof)


    hi all

    I use the free version. From a while on something goes wrong with the new user approval email. This is what is sent (translated):

    %1$s (%2$s) has requested a username at %3$s

    https://www.mysite.ext

    to approve or deny this user at %s go to

    url

    Even the email to the approved user display “%1$s” instead of the correct input

    How can I fix it?

    Thank you

    Myriam

Viewing 15 replies - 1 through 15 (of 21 total)
  • Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @forprof,

    Thanks for contacting us,

    I hope you are doing well, We have forwarded this to our technical team and we will get back to you soon.

    Thanks & Regards

    WP Experts Support Team

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @forprof,

    We checked on our staging site and there is not occurred any issue like that but we are providing you a snippet of code it may be resolved. Please add this code snippet in the functions.php file to the child theme.

    $my_class = pw_new_user_approve::instance();
    remove_action( 'user_register', array( $my_class, 'request_admin_approval_email_2' ) );
    
    add_action('user_register', 'nua_admin_approval_email');
    
    
    function nua_admin_approval_email($user_id) {
    
    	$user = new WP_User( $user_id );
        $user_login = stripslashes( $user->data->user_login );
        $user_email = stripslashes( $user->data->user_email );
        admin_approval_emails( $user_login, $user_email );
    
    }
    
    function admin_approval_emails( $user_login, $user_email ) {
    
    
    	$default_admin_url = admin_url( 'users.php?s&pw-status-query-submit=Filter&new_user_approve_filter=pending&paged=1' );
    	$admin_url = apply_filters( 'new_user_approve_admin_link', $default_admin_url );
    	/* send email to admin for approval */
    	$message = apply_filters( 'new_user_approve_request_approval_message_default', nua_default_notification_message() );
    	$message = nua_do_email_tags( $message, array(
    		'context'    => 'request_admin_approval_email',
    		'user_login' => $user_login,
    		'user_email' => $user_email,
    		'admin_url'  => $admin_url,
    	) );
    	$message = apply_filters(
    		'new_user_approve_request_approval_message',
    		$message,
    		$user_login,
    		$user_email
    	);
    	$subject = sprintf( __( '[%s] User Approval', 'new-user-approve' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) );
    	$subject = apply_filters( 'new_user_approve_request_approval_subject', $subject );
    	$to = apply_filters( 'new_user_approve_email_admins', array( get_option( 'admin_email' ) ) );
    	$to = array_unique( $to );
    	// send the mail
    	wp_mail(
    		$to,
    		$subject,
    		$message,
    		nua_email_header()
    	);
    
    }
    
    function nua_email_header() {
    
    	$admin_email = get_option( 'admin_email' );
    	if ( isset($_SERVER['SERVER_NAME']) && empty($admin_email) ) {
    		$admin_email = 'support@' . sanitize_text_field(wp_unslash($_SERVER['SERVER_NAME']));
    	}
    	$from_name = get_option( 'blogname' );
    	$headers = array( "From: \"{$from_name}\" <{$admin_email}>\n" );
    	$headers = apply_filters( 'new_user_approve_email_header', $headers );
    	return $headers;
    }

    Please let me know if you still have any issues.

    Thank you

    I have the same problem.

    I’ve tried that snippet of code but I haven’t resolved.

    Plugin Support Mirza Hamza

    (@hamza1010)

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

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @rorywp20 ,

    We have fixed this issue in New User Approve latest version.

    Here is the updated plugin: Download Link.

    Please check it and let me know if you still have any issues.

    Thank you

    I’ve already have the latest version.

    I’ve found out that I have that issue only if I open the email with the default windows email app for notebook (windows 10)

    Plugin Support Mirza Hamza

    (@hamza1010)

    We have checked on our side and it is working fine. Please check in Windows OS Email Configuration there may be a solution.

    michelehinet

    (@michelehinet)

    i have the same problem with plugin 2.5.2 free version, wordpress 6.3.2 and php 8.2

    i try your snippet in function php but nothing change

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @michelehinet,

    We have replied to the new thread. Please follow up there.

    Thank you

    negrifil

    (@negrifil)

    Hi, I’ve had the same problem for at least a year. My current version is 2.5.2

    If there is a new thread about it can you please put a link here?

    Thank you

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @negrifil,

    We have manually added the Italian translation into the New User Approve Plugin. Please use this updated plugin on your site and let us know if you still have any issues.

    Here is the Updated Plugin:?Download Link.

    Also, please have a look at the?screencast video.

    Thank you

    Hello @hamza1010 ?? thank you for your reply.

    It seems to work! thanks a lot!

    ??

    Thread Starter forprof

    (@forprof)

    Hi @hamza1010

    it seems the update plugin has been trashed. Can you please re-post the link? I need it too.

    Thank you!

    Myriam

    Thread Starter forprof

    (@forprof)

    done. thank you

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hello @negrifil @forprof,

    We would greatly appreciate your kind and honest review. Your feedback is important to us and can help other users make informed decisions about our product and services. Thank you for taking the time to share your thoughts.

    Thank you

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘new user approval email’ is closed to new replies.