ms_addon_mailchimp_subscribe_user_merge_vars

The Membership 2 ms addon mailchimp subscribe user merge vars hook.

Description

apply_filters( 'ms_addon_mailchimp_subscribe_user_merge_vars', (unknown) $merge_vars, (unknown) $member, (unknown) $list_id ); 

Parameters (3)

0. $merge_vars (unknown)
The merge vars.
1. $member (unknown)
The member.
2. $list_id (unknown)
The list id.

Usage

To run the hook, copy the example below.
  1. $merge_vars = apply_filters( 'ms_addon_mailchimp_subscribe_user_merge_vars', $merge_vars, $member, $list_id ); 
  2.  
  3. if ( !empty( $merge_vars ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the ms_addon_mailchimp_subscribe_user_merge_vars callback 
  2. function filter_ms_addon_mailchimp_subscribe_user_merge_vars( $merge_vars, $member, $list_id ) { 
  3. // make filter magic happen here... 
  4. return $merge_vars
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'ms_addon_mailchimp_subscribe_user_merge_vars', 'filter_ms_addon_mailchimp_subscribe_user_merge_vars', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'ms_addon_mailchimp_subscribe_user_merge_vars', 'filter_ms_addon_mailchimp_subscribe_user_merge_vars', 10, 3 ); 

Defined (1)

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

/app/addon/mailchimp/class-ms-addon-mailchimp.php  
  1. $merge_vars = apply_filters(