mc4wp_integration_subscribed

Runs right after someone is subscribed using an integration.

Description

do_action( 'mc4wp_integration_subscribed', (MC4WP_Integration) $integration, (string) $subscriber_email_address, (array) $subscriber_merge_fields, (MC4WP_MailChimp_Subscriber[]) $map, (int) $related_object_id ); 

Parameters (5)

0. $integration (MC4WP_Integration)
The integration.
1. $subscriber_email_address (string)
The subscriber email address.
2. $subscriber_merge_fields (array)
The subscriber merge fields.
3. $map (MC4WP_MailChimp_Subscriber[])
The map.
4. $related_object_id (int)
The related object id.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'mc4wp_integration_subscribed', $integration, $subscriber_email_address, $subscriber_merge_fields, $map, $related_object_id ); 
The following example is for adding a hook callback.
  1. // define the mc4wp_integration_subscribed callback 
  2. function action_mc4wp_integration_subscribed( $integration, $subscriber_email_address, $subscriber_merge_fields, $map, $related_object_id ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'mc4wp_integration_subscribed', 'action_mc4wp_integration_subscribed', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'mc4wp_integration_subscribed', 'action_mc4wp_integration_subscribed', 10, 5 ); 

Defined (1)

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

/includes/integrations/class-integration.php  
  1. do_action( 'mc4wp_integration_subscribed', $integration, $subscriber->email_address, $subscriber->merge_fields, $map, $related_object_id );