Advertisement
fauzanjeg

JKIT || Change Mailchimp API Response messages

Mar 29th, 2023 (edited)
1,067
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. /**
  2.  * Change Mailchimp API Response messages
  3.  *
  4.  * @param array $response The Response data.
  5.  *
  6.  * @return array
  7.  */
  8. function change_mailchimp_response_messages( $response ) {
  9.     /**
  10.      * Check The Message
  11.      */
  12.     switch ( $response['message'] ) {
  13.         case 'Member Exists'; /** The Message */
  14.             $response['message'] = __( 'Your Translation' ); /** Change The Message */
  15.             break;
  16.     }
  17.  
  18.     /**
  19.      * Return The Response Data
  20.      */
  21.     return $response;
  22. }
  23. add_filter( 'jkit_mailchimp_response', 'change_mailchimp_response_messages' );
Tags: JKIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement