How can I import members with subscription data

Hi There,

I have a database of subscribers to a magazine which we have now launched online and we are using the membership 2 plugin.

Can you please tell me how I can import my existing magazine subscribers into membership 2 as users/members.

We have a database or csv file with all the necessary fields including first name, last name, email, a password etc.

This is urgent :slight_smile: so i hope someone is on the support line tonight (it does indicate 24/7 responses)

  • Nastia
    • Support Rock Star

    Hello @timvb, I hope you are well today!

    Thank you for your question!

    You can use json file to import members and memberships. If you go to Membership 2 > Settings > Import Tool > Export Data and you will get a json file. I recommend to export from membership 2, get the json file and follow the format.

    Please, feel free to let me know if you require any further information.

    Kind Regards,
    Nastia

  • timvb
    • Design Lord, Child of Thor

    Hi @Anastasia

    Ok great .. I'll look at that export .. then create a json file matching that for import.

    Is there a template somewhere .. the file i get is quite difficult to understand the format.

    Can you please also tell me how do I add custom fields for the member profile .. I need to add things such as postal address for receiving our actual printed magazine .. and also their current subscriber number etc etc ..

    Also .. can I import passwords ? I want to set a temporary password which will be printed and sent to them.

    Tim

  • timvb
    • Design Lord, Child of Thor

    Hi @Anastasia

    I have managed to import wordpress users via another plugin but now I'm looking for a way to add those users to a membership 2 membership in bulk ..

    The only way I can see currently to add users is one by one .. and I have 1,000 members who I want to add to a membership that i've created.

  • Sajid
    • DEV MAN’s Sidekick

    @AnastasiaHi @timvb,

    Hope you are doing good today :slight_smile:

    I am glad to know you have manage to import your users, perfect. Now you can easily import memberships and their relationship with them by using the Membership 2 import/export tool.

    Just export members from source site (as explained @Anastasia in her first reply), upload and import on target site. Membership will automatically import all existing members, memberships and their relationship with them. You don't need to do this one by one.

    Hope that helps! If you still need assistance, don't hesitate to ask.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • timvb
    • Design Lord, Child of Thor

    @Sajid @Anastasia

    I'm not bringing members over from an existing site .. I'm importing the from a database of subscribers to a magazine.

    I have managed to import the users into wordpress but now i just need to allocate them to a membership level with individual expiry dates ..

    Is this possible via the json export for existing users on the same site ?

    Tim

  • Sajid
    • DEV MAN’s Sidekick

    Hi @timvb,

    Hope you are doing good today :slight_smile:

    Oh, I am sorry for confusion here. I assumed you are bringing them from another WordPress site where you have configured Membership 2 and already have members in different memberships.

    In this case, I am afraid there its not possible at the moment out of the box. Sorry! However, you can add members in a membership by selecting them and all selecting the membership from dropdown of bulk actions from Membership 2 > All Members. But you still need to set their expiry date manually of each member via subscription details.

    Hope that helps! If you still need assistance, don't hesitate to ask.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

  • timvb
    • Design Lord, Child of Thor

    @Sajid

    Surely there is a way to do this in the actual database ? If you can tell me what gets written to the database when a membership is added to a wp-user I can create a script to update the 1,000 plus members ?

  • Sajid
    • DEV MAN’s Sidekick

    Hi @timvb,

    Hope you are doing good today :slight_smile:

    If you want to do this with a script then you can use the API of membership 2 in this case. But you must know the user id and membership id to do that.

    $api = ms_api();
     $api->add_subscription( $user_id, $membership_id );

    With above code you can add a user into a membership. You can find extensive documentation about membership 2 API from Membership 2 > Help > API Docs.

    Hope that helps! If you still need assistance, don't hesitate to ask.

    Take care and have a nice day :slight_smile:

    Kind Regards,
    Sajid J

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.