• Resolved rorywp20

    (@rorywp20)


    Hi!

    Is it possible to change the subject of the email that is sent to the approved users?

    Thank you!

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

    (@hamza1010)

    Hi @rorywp20,

    Thanks for your email,

    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 @rorywp20,

    Yes, you can change the approval email subject by using this code snippet to the functions.php file of a child theme.

    Here is the code:

    add_filter('new_user_approve_approve_user_subject', 'nua_change_approval_email_subject', 10);
    function nua_change_approval_email_subject($subject) {
            $new_subject = 'any subject here'; // here replace any subject here text with your subject between single quotes.
            return $new_subject;
    }
    
    
    

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

    Thank you

    Thread Starter rorywp20

    (@rorywp20)

    Thank you very much!

    And for the Denied Email subject?

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @rorywp20,

    Yes, you can change the denied email subject by using this code snippet.

    Here is the code:

    add_filter('new_user_approve_deny_user_subject ', 'nua_change_denied_email_subject', 10);
    
    function nua_change_denied_email_subject($subject) {
            $new_subject = 'any subject here'; // here replace any subject here text with your subject between single quotes.
            return $new_subject;
    }

    Thank you

    Thread Starter rorywp20

    (@rorywp20)

    Ok, thank you very very much!!!

    Plugin Support Mirza Hamza

    (@hamza1010)

    We would appreciate a kind and honest review.

    Thread Starter rorywp20

    (@rorywp20)

    I have just left my 5-star review.

    Plugin Support Mirza Hamza

    (@hamza1010)

    Thank you so much

    Thread Starter rorywp20

    (@rorywp20)

    @hamza1010 ?the code snippet to change the denied email subject doesn’t work

    Thread Starter rorywp20

    (@rorywp20)

    I’ve resolved.

    There was a blank space before the quote here: ‘new_user_approve_deny_user_subject ‘

    Plugin Support Mirza Hamza

    (@hamza1010)

    Thanks for the feedback.

    add_filter(‘new_user_approve_deny_user_subject ‘, ‘nua_change_denied_email_subject’, 10);

    function nua_change_denied_email_subject($subject) {
    $new_subject = ‘[Your Gifts & (S) Private Limited] Registration Denied’; // here replace any subject here text with your subject between single quotes.
    return $new_subject;
    }

    Approve is working but deny is not working, please help.

    How to change sender name and the sender name in the email content? See below.

    Gifts & (S) Private Limited (because the & is not correctly displayed, should be &)

    You have been denied access to Gifts & (S) Private Limited.

    You have been approved to access Gifts & (S) Private Limited

    Plugin Support Mirza Hamza

    (@hamza1010)

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

    Plugin Support Mirza Hamza

    (@hamza1010)

    Hi @sandracorsivalab,

    Please try deny filter after removing the space at the end of filter name.

    Please have a look at the screenshot.

    Filter to change the Subject of the deny email:

    add_filter('new_user_approve_deny_user_subject', 'nua_change_denied_email_subject', 10);
    
    function nua_change_denied_email_subject($subject) {
    $new_subject = '[Your Gifts & (S) Private Limited] Registration Denied'; // here replace any subject here text with your subject between single quotes.
    return $new_subject;
    } 
    

    Filter to change the sender name and email:

     add_filter( 'new_user_approve_email_header',function( $headers){
    
    	$admin_email="[email protected]"; //enter sender email
    	$from_name = 'Sender Name Here'; //enter sender name
    
    	return array( "From: \"{$from_name}\" <{$admin_email}>\n" );
     },99,1 );
    

    Filter to change the content of the deny email:

    add_filter( 'new_user_approve_deny_user_message', function(){
    	$message='You have been denied access to Gifts & (S) Private Limited.';
    	return $message;
    },99);
    

    Please see the screenshot.

    Let us know if you have any questions.

    Thank you

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Change Approval Email subject’ is closed to new replies.