Send WP user role to MailChimp as a field?
-
Is it possible to send WP user role (Admin, Contributor) etc as a field? I have tried:
add_filter( 'mailchimp_sync_user_data', function( $data, $user ) { $data['MERGE3'] = $user->wp_user-settings; return $data; }, 10, 2 );
Result in mailchimp list was a blank column
Then I triedadd_filter( 'mailchimp_sync_user_data', function( $data, $user ) { $data['MERGE3'] = $user->wp_user-level; return $data; }, 10, 2 );
Result in mailchimp was 10 for admins and 0 for all others
Also triedadd_filter( 'mailchimp_sync_user_data', function( $data, $user ) { $data['MERGE3'] = $user->wp_capabilities; return $data; }, 10, 2 );
Result in mailchimp list was a blank column
Wondering how I can get WP user role column into MailChimp?
Thanks in advance,
Will
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Send WP user role to MailChimp as a field?’ is closed to new replies.