Skip to content

Instantly share code, notes, and snippets.

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

What would you like to do?
add_filter( 'mailchimp_sync_subscriber_data', function( MC4WP_MailChimp_Subscriber $subscriber, $user ) {
$affiliate = affiliate_wp()->affiliates->get_by( 'user_id', $user->ID );
if( ! empty( $affiliate ) ) {
$subscriber->merge_fields['MERGE6'] = $affiliate->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.