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.
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?
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.