mc4wp_after_subscribe

The MailChimp for WordPress Lite mc4wp after subscribe hook.

Description

do_action( 'mc4wp_after_subscribe', (string) $email, (array) $merge_vars, (boolean) $result ); 

Parameters (3)

0. $email (string)
The email.
1. $merge_vars (array)
The merge vars.
2. $result (boolean)
Runs after the request is sent to MailChimp

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'mc4wp_after_subscribe', $email, $merge_vars, $result ); 
The following example is for adding a hook callback.
  1. // define the mc4wp_after_subscribe callback 
  2. function action_mc4wp_after_subscribe( $email, $merge_vars, $result ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'mc4wp_after_subscribe', 'action_mc4wp_after_subscribe', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'mc4wp_after_subscribe', 'action_mc4wp_after_subscribe', 10, 3 ); 

Defined (2)

The action is defined in the following location(s).

/includes/integrations/class-integration.php  
  1. do_action( 'mc4wp_after_subscribe', $email, $merge_vars, $result ); 
/includes/class-subscribe-request.php  
  1. do_action( 'mc4wp_after_subscribe', $this->user_data['EMAIL'], $this->user_data, 0, $result );