Support » Plugin: Awesome Support - WordPress HelpDesk & Support Plugin » Add extra standard recipient email on ticket reply

  • Resolved zsimaiofgr

    (@zsimaiofgr)


    Hello everyone.

    What i want to do is add an extra standard email address as a recipient when a ticket reply is posted.

    I tried using the https://developer.getawesomesupport.com/documentation/hooks-and-filters/wpas__user_email_notifications_email/ filter hook and the following code :

     add_filter( 'wpas__user_email_notifications_email',  'add_extra_email', 10, 3);
     
     function add_extra_email( $email_variables, $case, $ticket_id ) {
      $temp_arr_user_rep = array();
       $temp_arr_user_rep["user_id"]="0";
       $temp_arr_user_rep["email"]="additional@email.com";
      
       array_push($email_variables["recipient_email"],$temp_arr_user_rep);
     
       return $email_variables;
     }

    but it doesn’t seem to work….
    Any suggestions??

    Thank you in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @zsimaiofgr

    Thank you for reaching. I will look into it and get back to you.

    if you have any questions, please let me know.

    Regards

    Thread Starter zsimaiofgr

    (@zsimaiofgr)

    Hello @jahmedas

    i found the solution a couple of hours after the post.

    The answer is to use the wpas_email_notifications_email filter hook in the following way :

    add_filter( 'wpas_email_notifications_email',  'example_callback', 10, 3);
    function example_callback( $email_variables, $case, $ticket_id ) {
    
       
                $temp_arr_user_rep = array();
                $temp_arr_user_rep["user_id"]=0;
                $temp_arr_user_rep["email"]="additionalrecipient@email.com";
                array_push($email_variables["recipient_email"],$temp_arr_user_rep);
               
                return $email_variables;
        }
    • This reply was modified 1 year, 2 months ago by zsimaiofgr.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add extra standard recipient email on ticket reply’ is closed to new replies.