mc4wp_subscribe

The MailChimp for WordPress Lite mc4wp subscribe hook.

Description

do_action( 'mc4wp_subscribe', (unknown) $email, (unknown) $list_id, (unknown) $merge_vars, (unknown) $result, (string) $checkbox, (unknown) $type, (unknown) $related_object_id ); 

Parameters (7)

0. $email (unknown)
The email.
1. $list_id (unknown)
The list id.
2. $merge_vars (unknown)
The merge vars.
3. $result (unknown)
The result.
4. $checkbox (string) => 'checkbox'
The checkbox.
5. $type (unknown)
The type.
6. $related_object_id (unknown)
The related object id.

Usage

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

Defined (2)

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

/includes/integrations/class-integration.php  
  1. do_action( 'mc4wp_subscribe', $email, $list_id, $merge_vars, $result, 'checkbox', $type, $related_object_id ); 
/includes/class-subscribe-request.php  
  1. do_action( 'mc4wp_subscribe', $this->user_data['EMAIL'], $list_id, $list_merge_vars, $result, 'form', 'form', 0 );