• Resolved jglazer63

    (@jglazer63)


    Is there a way to automatically fire off an email when a user status is changed? I’d like to provide additional details when I make someone an “author” for example.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jglazer63

    You can use this filter hook to disable email notifications:
    um_get_option_filter__<template>_on

    Example of disabling Welcome Email:
    add_filter("um_get_option_filter__welcome_email_on","__return_zero");

    To attach it to the Change Status, you can try this action hook:

    add_action("um_after_user_status_is_changed", function( $status, $user_id ){
        
        if( $status == 'approved' ){ 
           // disable welcome email on approval
           add_filter("um_get_option_filter__welcome_email_on","__return_zero");
        }  
    }, 99, 2);

    Regards,

    • This reply was modified 3 years, 9 months ago by Champ Camba.
    Thread Starter jglazer63

    (@jglazer63)

    Thanks for the reply but I want to send an email when a user is upgraded from subscriber to author. A rather lengthy email at that. How would I do this?

    Thanks!!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jglazer63

    You can use this action hook to trigger the email:

    add_action("um_after_user_role_is_updated","um_021621_after_user_role_is_updated", 10, 2);
    function um_021621_after_user_role_is_updated( $user_id, $role ){
        // do something
    }

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @jglazer63

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

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