Membership2 Pro importing users existing in WordPress

Hi,
I have about 30,000 users in the wp_users table, is there an easy way for users to subscribe to the membership2 Pro memberships? Hopefully I am not missing something obvious, but I tried to update the Json blob in wp_usermeta meta_key = 'ms_subscriptions', but was unsuccessful. I also tried to import a modified version of the Json file that is generated by going to Dashboard -> Membership 2 -> Settings -> Import Tool -> "Generate Export". I added subscription data to "subscriptions": [ ] area for a user that was not subscribed, but that didn't work either. Also, how is "id": XXXX, generated. That might be my issue. Below is the Json file I am importing. Your help is appreciated.

{
"source_key":"membership2",
"source":"Membership2",
"plugin_version":"1.0.3.0",
"export_time":"2016-08-02 09:37",
"notes":
[
"Exported data:",
"- Memberships (without protection rules)",
"- Members (including Stripe\/Authorize payment settings)",
"- Subscriptions (link between Members and Memberships)",
"- Invoices"
],
"memberships":
[
{
"id":10000,
"name":"System Membership",
"description":"Membership2 Core Membership",
"type":"base",
"active":true,
"private":false,
"free":false,
"price":0,
"trial":false,
"payment_type":"permanent"
},
{
"id":10001,
"name":"Experts Default Membership",
"description":"",
"type":"simple",
"active":true,
"private":false,
"free":true
}
],
"members":
[
{
"id":10002,
"email":"testuser@yahoo.com",
"username":"testuser",
"payment":
{
"stripe_card_exp":"",
"stripe_card_num":"",
"stripe_customer":"",
"authorize_card_exp":"",
"authorize_card_num":"",
"authorize_cim_profile":"",
"authorize_cim_payment_profile":""
},
"subscriptions":
[
{
"id":10003,
"membership":10001,
"status":"active",
"gateway":"admin",
"start":"2016-08-02",
"end":"",
"trial_finished":"1",
"invoices":[]
}
]
},
{
"id":10004,
"email":"tonkymm@yahoo.com",
"username":"tonkymm",
"payment":
{
"stripe_card_exp":"",
"stripe_card_num":"",
"stripe_customer":"",
"authorize_card_exp":"",
"authorize_card_num":"",
"authorize_cim_profile":"",
"authorize_cim_payment_profile":""
},
"subscriptions":
[
{
"id":10005,
"membership":10001,
"status":"active",
"gateway":"admin",
"start":"2016-08-02",
"end":"",
"trial_finished":"1",
"invoices":[]
}
]
}
],
"settings":
{
"enabled":true,
"hide_toolbar":true,
"currency":"USD",
"invoice_sender":""
},
"coupons":[]
}

  • Adam Czajczyk
    • Support Gorilla

    Hello Frank,

    I hope you're well today and thank you for your question!

    Let me please make sure that we're on the same side first :slight_smile: Your goal is to automatically assign selected membership to all WP users of your site that did not yet subscribed for any, do I understand it correctly?

    Or are you trying to export non-membership users from one WP install and then import them as a Membership 2 Pro members into other WP install?

    Please advise!

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.