Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Iris M

    (@iris-m-1)

    Hi – never got a response – can you please help me so I can pass all fields necessary through to mailchimp?

    Hi Iris,

    You should edit some of the plugin code to make sure your fields are being sent to MailChimp.

    If you open up and scroll down in the file ‘ListSynchronizer.php’ of the MailChimp Sync plugin (it’s in the src folder), you’ll see FNAME and LNAME are being pulled from the wp_usermeta table by calling get_user_meta.

    If you’re sure the users zip code is being set as user meta upon registration, all you need to do is add a line in the extract_merge_vars_from_user function:

    if( '' !== get_user_meta( $user->ID, 'zip_code', true ) ) {
         $data['ZIPCODE'] =  get_user_meta( $user->ID, 'zip_code', true );
    }

    Make sure to match ‘zip_code’ with the meta_key in the wp_usermeta table, and check that the MERGE tag in the MailChimp settings correspondents with what you set in $data[]. Obviously all has to match, otherwise the zip code still won’t show up in MailChimp.

    Remember that editing core / plugin code isn’t a great idea because of futures updates, these will erase your custom code. Consider this as a quick and dirty fix.

    Good luck ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sync does not pass other fields’ is closed to new replies.