this is my functions.php file also
//Add buddypress xprofile field to MailChimp Sync
//Call the function
add_filter( 'mailchimp_sync_user_data', 'mailchimp_buddypress', 10, 2 );
//Write the function
function mailchimp_buddypress( $data, $user ) {
//Get user ID
$user_id = $user->ID;
// Store Xprofile fields in the $data variable
$data['STREET'] = xprofile_get_field_data( 13 , $user_id );
$data['STREET2'] = xprofile_get_field_data( 14 , $user_id );
$data['CITY'] = xprofile_get_field_data( 7 , $user_id );
$data['STATE'] = xprofile_get_field_data( 14 , $user_id );
$data['ZIP'] = xprofile_get_field_data( 9 , $user_id );
$data['PHONE1'] = xprofile_get_field_data( 16 , $user_id );
$data['PHONE2'] = xprofile_get_field_data( 17 , $user_id );
$data['COUNTRY'] = xprofile_get_field_data( 28 , $user_id );
//$data['FINSHLINE'] = xprofile_get_field_data( 20 , $user_id );
$data['EMPLOYER'] = xprofile_get_field_data( 3 , $user_id );
$data['INDUSTRY'] = xprofile_get_field_data( 4 , $user_id );
$data['JOBTITLE'] = xprofile_get_field_data( 5 , $user_id );
$data['MAJOR'] = xprofile_get_field_data( 6 , $user_id );
$data['YEARSROWED'] = xprofile_get_field_data( 10 , $user_id );
$data['YEARROWED'] = xprofile_get_field_data( 11 , $user_id );
$data['COACH'] = xprofile_get_field_data( 18 , $user_id );
$data['ADVDEG'] = xprofile_get_field_data( 19 , $user_id );
//Return the data
return $data;
}
the commented out FINISHLINE is for a checkbox that I’m unsure how to sync. I think I just disabled that for now anyhow.