Skip to content

Instantly share code, notes, and snippets.

@dannyvankooten dannyvankooten/how.php forked from pjrvs/how?
Last active May 19, 2017

What would you like to do?
add_filter( 'mailchimp_sync_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber, $user ) {
$affiliate_id = affiliate_wp()->affiliates->get_by( 'user_id', $user->ID );
if( ! empty( $affiliate_id ) ) {
$subscriber->merge_fields['MERGE6'] = $affiliate_id;
return $subscriber;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.