• Resolved Abdul Mian

    (@alrehman97)


    Hi,

    Is it possible to duplicate an email template, for example: “Account Approved Email.” So that we can send two emails when an account is manually approved? Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @alrehman97,

    Can you please clarify what do you mean by two emails?
    When do you want to send the first email and then the second?

    Regards.

    Thread Starter Abdul Mian

    (@alrehman97)

    Both of the emails will be sent at the same time when we manually approve the account.

    First email will just tell them their account is approved and the second email will be a welcome pack email.

    So, both email go right away when we manually approve the account. Any help will be appreciated.

    I think if we can just duplicate the “account approved email,” template then we can achieve this?

    Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @alrehman97

    Sorry for the late response. You can try the following code snippet to send the Welcome Email when the account is manually approve:

    add_action("um_when_status_is_set","um_102821_send_welcome_email");
    function um_102821_send_welcome_email( $status ){
    
        if ( um_user( 'account_status' ) == 'awaiting_admin_review' && is_admin() ) 
        {
            UM()->mail()->send( um_user( 'user_email' ), 'welcome_email' );
        }
    }

    You can add the code to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.

    Thread Starter Abdul Mian

    (@alrehman97)

    Thank you, it works!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Duplicate Email Template’ is closed to new replies.