• Resolved nerdyvampire

    (@nerdyvampire)


    Hi guys, I was thrown into a developer role some time ago, so please forgive my ignorance :> These are questions I am tackling right now, I have tried a few CSV imports for the #2 question, but they can’t seem to create users properly.
    [#1 How can I make my mc4wp form also register users to WP’s database?]
    Currently the mc4wp form is based on a list in our MailChimp database, and it correctly registers new users to the MailChimp database, with the proper groups and fields.
    However, it does not register users to our WordPress database, where we would like to access them for profiles and such.
    [#2 How can I sync/import users to my WP database from the MC database?]
    We used MailChimp as our primary database, so we have a few hundred subscribers. Now that I want them in WordPress, I am having trouble understanding how I can ‘make the move’. I know that mc4wp has an user sync that ought to go both ways, but it only notices updates, and doesn’t seem to create users in either based on those in the other. It does notice changes in MC when the email are registered both places. I have tried creating users in WP with an Ultimate Members form, but on manual sync these are not created in MC. If I create an entry with the given required fields in MC, it can sync the two just fine.

    I hope this isn’t too confusing, I can tend to be rambly. I hope you can understand my problem, and maybe suggest a solution.

    • This topic was modified 6 years, 10 months ago by nerdyvampire.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hello,

    The core plugin “MailChimp for WP” does not add users to WordPress. It will only add them to your MailChimp list.

    The add-on plugin “User Sync” can do the syncing. However, you will need to enable 2 way syncing to be able to listen to changes in MailChimp and add them to your website.

    Please check:
    https://kb.mc4wp.com/configure-webhook-for-2-way-synchronizing/
    https://github.com/ibericode/mc4wp-snippets/tree/master/add-ons/user-sync

    The last link contains a different set of code that you will need to add to the “functions.php” file inside your active theme folder should you require those features. These features including creating a user on your website, deleting them, etc.

    I hope that answers your query. Let us know if you have any further questions.

    Thread Starter nerdyvampire

    (@nerdyvampire)

    Hi Harish
    Thank you first for your reply, it seems like exactly what I need for this problem. Especially a nifty little function in the github, which pulls from the mailchimp database and ‘creates users if none exist’. If everything works here, we should be good. I will come back once it either works or I hit another wall.
    Thanks again!

    Thread Starter nerdyvampire

    (@nerdyvampire)

    Here’s an update;
    I have configured the webhook, and am now in the process of editing the ‘create user’ function in the github you linked. It can correctly create an user with some of the field values. I am editing it to fill in the remaining fields, but the groups are giving me a bit trouble. I am testing with -update_user_meta( $user_id, ‘meta_secret’, $data[‘merges’][‘INTERESTS’]);- just to see if I get anything out of it. Right now it is empty.
    I’ll be back later.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Registration to MC & WP, and syncing MC to WP.’ is closed to new replies.