Mailchimp Integration not importing users

Needed to create users that subscribed to a list, those are being added only in the list but not in the WordPress user database, by checking the logs I found this:
[February 9, 2018 3:54 am] Request type "campaign" unknown, ignoring.
[February 9, 2018 3:53 am] Request type not defined
[February 9, 2018 3:46 am] Request type not defined

Site has SSL enabled using Simple SSL

Thanks in advance!

  • Dimitris
    • Support Star

    Hello there eTech,

    hope you're doing good today! :slight_smile:

    As this is something that we couldn't reproduce, please do proceed with a complete website backup (our Snapshot plugin can help you on this) and then carry on with a complete conflict test.
    Concept should be to deactivate all plugins apart from WPMUDEV Dashboard and MailChimp Integration, activate a default theme like TwentySeventeen, clear/purge all caches and gives this another try.
    If testing users got registered successfully, then activate the remaining plugins and theme, one by one this time, checking each time, until you reproduce again the same issue, thus finding the conflicted combination.
    The following flow chart image can assist you better track the steps needed for this conflict test: https://premium.wpmudev.org/wp-content/uploads/2015/09/Support-Process-Support-Process.gif

    Looking forward for your results!
    Warm regards,
    Dimitris

  • Oguz
    • QA Engineer

    Hey eTech ,

    I hope you're well.

    While saying MP2 are you referring to our Membership 2 plugin? There is no integration between MailChimp Integration plugin and Membership 2 plugin so I can expect it will not add user to any membership. But I can provide you a custom code to do that. Create "automatic-assign-membership.php" file at wp-content/mu-plugins folder and inside it place this codes;

    <?php
    
    add_action('user_register', 'add_user_to_memberships', 10, 1);
    function add_user_to_memberships( $user_id ) {
        $member = MS_Factory::load( 'MS_Model_Member', $user_id );
        $member->add_membership(10);
    }

    Change $member->add_membership(10); this code 10 number to your membership id that you want to assign membership. You can find id like this;

    Then it should be assigned all new members (regardless of coming from MailChimp or any other register method) to that membership automatically.

    For the "Full Name" problem, I couldn't replicate it. But did you change any fields change from MailChimp side? Maybe that can cause the problem.

    And for the first problem "not adding user", I have a theory about that :slight_smile: As far as I notice MailChimp plugin gets mail name as username, like if your mail address "example@gmail.com" WordPress username will be "example". And when someone tries to subscribe MailChimp with "example@outlook.com" I think WordPress again tries to assign username as "example" but there is already example user. So it can skip that.

    Is that can be a problem?

    Cheers,
    Oguz

  • eTech
    • Design Lord, Child of Thor

    Hi,

    I ran a test, but it didn't go through complete. I was able to get the user signed up, was successfully added to the membership and got the user account created email, but the %password% placeholder came through as plain text on the automated email, so something is not parsing that correctly. Thanks!

  • Oguz
    • QA Engineer

    Hey eTech ,

    Hope you're well.

    Sorry for late reply, I am still working on it to find a way to make %password% placeholder to work with our way. But by the way I want to ask did you check to use "Default Membership" type for new added users, instead of assigning them to any membership?

    Cheers,
    Oguz

    • eTech
      • Design Lord, Child of Thor

      The template I was using is the following: "Subscription - Completed Successfully (free membership)". I changed it to the following: "Signup - User Account Created" and it seems to be working now, but I am not sure why the %password% doesn't work on the first template.

      Thanks!

      • Oguz
        • QA Engineer

        Hey eTech ,

        Hope you're well.

        WordPress keeping passwords hashed on the database and there is no way to revert password. So when password saved into the database you can't use it. For "Signup - User Account Created" email, user added just now, so we have still unhashed password and you can use that placeholder there. But on other templates because of we can't call password from database unhashed, you can't use.

        Cheers,
        Oguz

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.