Support » Plugin: Import and export users and customers » Stop sending mail for a specific role

  • The plugin can send an email every time the data in the csv changes for a user. Great function. But is there a way to disable email sending for a specific role? Or (even better) send a different email for that role?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Javier Carazo

    (@carazo)

    No, but we can include the hooks you need in case you want to customize this action using your own code.

    Would it be useful?

    Thread Starter voldemort76

    (@voldemort76)

    Yes, that might be a good idea!

    Plugin Author Javier Carazo

    (@carazo)

    What about this hook?

     // send mail
    $mail_for_this_user = apply_filters( 'acui_send_email_for_user', $mail_for_this_user, $headers, $data, $user_id, $role, $positions, $form_data, $is_frontend, $is_cron, $password_changed );
    
                            if( isset( $mail_for_this_user ) && $mail_for_this_user ){
                                if( !$created && $update_allow_update_passwords == 'no' )
                                    $password = __( 'Password has not been changed', 'import-users-from-csv-with-meta' );
    
                                ACUI_Email_Options::send_email( $user_object, $positions, $headers, $data, $created, $password );
                            }

    If this is ok I can include it and update the plugin with this new hook.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.