After import active members listed as expired

I tried updating for a while and managed to update to Membership 3.5.33 and then to M2. However, I am faced with a couple of issues.

The member and subscriptions were available from WPMU DEV DASHBOARD synced data but when I imported that data into Familytreeartstudio, then the users+subscriptions were imported, but users were listed under "expired" and not under "active subscribers".

So we need to understand as to exactly why this happened, and what will be changed after the update. Also had to set up PayPal/payment gateway info again as it was not available after import.

This is my test site. However, I have an actual site with several members/subscribers, if things go the way they are going now on the test site, I'll lose all my current membership. Also, the current PayPal/payment gateway info will be lost as well. Please advise.

    Kasia Swiderska

    Hello Kathleen,

    I'm very sorry for the delay on our side. Let me just say that updating this only on test site was right choice and until we find out what is causing this there live site shouldn't be updated.

    We need to check your site but to do that we need access to it. Could you please send in the following via our secure contact form https://premium.wpmudev.org/contact/ :

    - Mark to my attention, the subject line should contain only: ATTN: Kasia Swiderska
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    Please confirm here that you send those credentials

    Also please tell me if you have a backup from the testing site before the update? It would help if I could test update process from it on my test site and compare data there.

    kind regards,
    Kasia

    Kathleen

    Hi Kasia,

    I really hate to be a bother. However, do you have an updates or ETA on the issue(s)? My actual website has been down over a month now and I really want to get it back up. The problems I'm dealing with are?

    1. Will the new membership plugin be able to migrate the current members successfully

    2. Will the new membership plugin be able to handle the IPN notifications (which are currently disabled) once we restart everything ?

    Thanks,
    Kathleen

    Kasia Swiderska

    Hello Kathleen,

    I'm sorry but at the moment I don't have good news. I tested upgrading to Membership 2 Pro on two different sites and data from your site (one active member) always ends up with expired membership.
    I downloaded snapshot from your site and separately imported to my testes sites - one was very fresh install, I wanted to be sure that we don't have any plugin conflict here.
    Each time one active member had wrong date of expiration.
    Unfortunately further debugging did not help with seeing what is causing this problem because no significant errors showed up in debug.log.

    Right now I need to escalate this to our developers from Second Line Support.

    But there is one issue that bothers me. On your test site I discovered that installed Membership Premium is not coming from our site:

    this is from that test site (see the text in brackets). Is the same plugin on your live site? Because if it is, then we can't be sure that it's code was not altered. It is very important and we have to be sure that we are dealing with original plugin that was downloaded from our site.

    If on your live site, you have version from our site can you please make a snapshot and import it to your test site? Let me know when it will be done.

    kind regards,
    Kasia

    Kathleen

    Hi Kasia,

    Thanks so much for the response!  In regards to the plugin, the plugin was provided by the previous and first Developer of the website and it has been kept as it is till now.  That Developer is no longer with us for 3 years now. Therefore, it looks like the upgrade will not be a straightforward task. 

    We are now looking around to "Manually add a PAID membership" to the plugin.(since the automatic import from WPMU DEV ACCOUNT is probably going to mess up). 

    However, I can only imagine someone coming from a different membership environment altogether with existing PAID members, and wants to switch to M2 plugin would encounter this same type of problem/issues.   What would they do to start using M2 ???? (I am sure the M2 sales team must have faced that problem).  How do you all handle that?

    In our effort to find a solution and/or workaround, we found a few mechanisms and you do have two options to do this in a fresh installation of M2 -
    1) Add Member (admin option)
    2) Import tool (bulk upload using a json file)

    First, we tried using the "1) Add Member" option to add a member but the problem with #1) is that after adding the new member it stays in "admin" payment gateway. We don't want that. We need members in "paypalstandard" gateway so that their payments continue as usual. (members in admin gateway are not linked to paypal).

    So we looked into #2):

    The M2 plugin can add members (and their gateway) by importing a "json" file with the memberships and users listed in a proper format they have defined internally(attached a sample). Now  we can construct the import file ourselves manually ( although it will take some time and tweaking). This way we can also test out the import on our test site first to check if the imports are working by looking at the users added and their expiry dates, gateway etc.

    However, the only doubt  and concern we currently have is as follows:
    if a new 'member + membership +  subscription' is added via the import tool ( using a json file), Will the plugin be able to process the payment for the user next month properly (i.e will the logs/history show the subsequent payments) ? or do we also need to perform some other IPN related changes?

    If we can get the answer for the question above answered, we believe we can take it from there. Our goal and  intent is to add the members manually using the import tool to the latest M2 plugin.  Again, we need to know if a new 'member + membership +  subscription' is added via the import tool ( using a json file), Will the plugin be able to process the payment for the user next month properly (i.e will the logs/history show the subsequent payments) ? or do we also need to perform some other IPN related changes ?

    Thanks so much for all your help.

    Kindest Regards,
    Kathleen

    Rupok

    Hi Kathleen,

    You said you've attached a sample but I'm afraid, I don't see anything attached to your last reply. Am I missing anything? If you are having trouble attaching a JSON file here, can you compress that in zip format and then try attaching? If that doesn't help, please upload the sample JSON file to any popular file sharing site like Dropbox, Google Drive etc. and provide the download link. We will test with that.

    And I do agree with Kasia. The imported subscription details have a wrong expiry date. So I've pinged our developer regarding this and I believe, he will come up with a fix very soon. We will update you as soon as we get anything from him.

    Please keep in mind, our developers work around the clock and they have to deal with lots of critical issues and other things. So it may take a little while for them to check this and release a fix.

    I will appreciate your patience.

    Have a nice day. Cheers!
    Rupok

    Kathleen

    Hi Rupok,

    Thanks for responding. Sorry you can't access the file. Let me try something different and get back to you on that . In the meantime, please provide the answer the following question:

    "On a fresh WordPress installation, how do I add a new member in M2 with an existing recurring PAID membership listed with Paypal Standard gateway (not as admin) ?".

    Thanks,
    Kathleen

    Rupok

    Hi Kathleen,

    On a fresh WordPress installation, how do I add a new member in M2 with an existing recurring PAID membership listed with Paypal Standard gateway (not as admin)

    Thanks for asking. I'm afraid, it's not possible to add a new member to an existing recurring PAID membership. However, there is a workaround.

    That is, you should add that member with finite membership to the moment when their subscription should be finished. So they will have still access. After that, you will need to tell your user to subscribe again. And you will also need to delete their previous recurring payment subscription from PayPal.

    Please let us know if you have any further confusion or any other query. We are always here to help.

    Have a nice day. Cheers!
    Rupok

    Kathleen

    Hi Rupok,

    Per my developer, the JSON is your own standard format and you have the ability to export one from their own system anytime and use that to import. Are you aware that such feature exist in your code? I had forwarded the file from my developer to Kasia via contact. However, someone name Samantha, replied to the email. Please check with them as I don't know any other way to send it to you.

    Also, my developer has been working extremely hard trying to figure this out himself. Right now, it seems that the subscription in paypal is working as expected but the same transaction is not being reflected in the plugin's transactions history. The mechanism which joins the two is PayPal IPN. Looking at the access logs on the server he can see that the IPN notifications are being sent from PayPal's server and received on our servers. But unfortunately the latest version of the M2 plugin is not able to process the IPN callbacks properly. He can't t seem to figure out why this is happening. Do you have any insight on this? Let me know!

    Thanks,
    Kathleen

    Kasia Swiderska

    Hello Kathleen,

    Per my developer, the JSON is your own standard format and you have the ability to export one from their own system anytime and use that to import. Are you aware that such feature exist in your code?

    Yes, we are aware of this feature. It will import users and membership, but there is problem with payment gateways. In file you send us, the gateway is Admin. It means that you can't tie this with PayPal gateway and existing subscription. That is why Rupok proposed above workaround.

    Do you have export file with real users and payment gateways like paypal? Or you can import Snapshot from your site with real user to your test site so I can try one more thing to generate proper JSON? Let me know.

    kind regards,
    Kasia

    Kathleen

    Hi Kasia,

    Thanks for responding.  However, I'm somewhat confused about specifically what you are asking & requesting in your reply as follows:  Do you have export file with real users and payment gateways like paypal? Or you can import Snapshot from your site with real user to your test site so I can try one more thing to generate proper JSON?

    My Developer is  currently the only real user on the test site and someone from WPMU DEV. With regards to payment gateways, Paypal,  he of course, is using his Paypal Sandbox account for testing purposes.  Also, I'm sure he got pass the Admin component issue,  once Ropuk answered our question to the following:  On a fresh WordPress installation, how do I add a new member in M2 with an existing recurring PAID membership listed with Paypal Standard gateway (not as admin).

    Additionally, I'm befuddled, perplexed and disturbed at this so called "workaround" coming from you guys. That is not a workaround, that is a RESET and starting all over again. As I stated in a previous post: "I can only imagine someone coming from a different membership environment altogether with existing PAID members, and wants to switch to M2 plugin would encounter this same type of problem/issues. What would they do to start using M2 ???? (I am sure the M2 sales team must have faced that problem). How do you all handle that? This question was never answered. It's it clear and apparent to me that the M2 Plugin does not offer this, which is unfortunate.

    Also, why did and would you all have me going thru all the trouble of sending/submitting a JSON file to you, when the JSON is your own standard format and you have the ability to export one from your own system anytime and use that to import. And now again, you're asking me for something that you clearly have the ability to produce and do yourself. My developer did it! You have the capability to do the exact same thing (i.e. produce a proper JSON).

    Lastly, if we've got to start from scratch, which is going to consist of us having to request and have current active users subscribe again (resubscribe), we may have to abandon the plug-in and look for other alternatives and solutions because I am personally becoming very frustrated.

    Regards,
    Kathleen

    Kasia Swiderska

    Hello Kathleen,

    I'm extremely sorry for the confusion that was made on our side. Let me get back to your previous post and start again with answers to your questions. There was some mixup done in this thread, so I will try straighten things up.

    However, I can only imagine someone coming from a different membership environment altogether with existing PAID members, and wants to switch to M2 plugin would encounter this same type of problem/issues. What would they do to start using M2 ???? (I am sure the M2 sales team must have faced that problem). How do you all handle that?

    There is no way of handling that without writing custom migration tool and changing code for Membership 2 Pro to recognize other plugin IPN url . Membership 2 Pro never had feature that would all to import existing paying subscribers and keep the subscriptions inside the plugin.
    If also plugin does not use WordPress users, but keeps them in custom way (members are not WordPress users in the same time), then Membership will not see them at all.
    If plugin uses WordPress users like the Membership does, then there is no problem for Membership to "see" those users (because they are WP users).
    But still, there is option to "migrate" subscriptions, memberships, gateways, transactions history and keep running those recurring subscriptions.
    Migration tool of this kind was never developed on our side.

    if a new 'member + membership + subscription' is added via the import tool ( using a json file), Will the plugin be able to process the payment for the user next month properly (i.e will the logs/history show the subsequent payments) ? or do we also need to perform some other IPN related changes?

    So migration from Membership Premium is different case. Membership 2 Pro has tool for importing data of users from old plugin. But the JSON file is created by pulling data from Membership 2 Pro as this is feature of new plugin.
    So if data from old plugin was imported incorrectly to Membership 2 Pro (wrong dates of expiration) then JSON will also have wrong data.

    I talked with developers and seems that importing data from old plugin is broken in latest version of the plugin.
    So I did little digging and found that similar bug was fixed in older version of Membership 2 Pro ( this is one https://premium.wpmudev.org/download/164350753_membership2-1.0.27.zip ).
    I'm thinking that dates issues can be resolved with not updating to latest Membership 2 pro, but older version first - to get correct import and then update to latest version.

    It leaves us with second important problem - recurring memberships and renewing them. Membership Premium had different IPN url than Membership 2 pro has now.
    And here things are not good, because without fallback code renewing subscriptions will not work.
    But I talked with developer about this issue and there is way of doing this - he said it would be possible to fix code to correctly handle old IPN and keep recurring subscriptions working.
    This is not few minutes fix, it will take a while to code that and test. I'm creating task for that for him now.

    For past few weeks PayPal sandbox was broken, it was on PayPal side ( https://stackoverflow.com/questions/44846718/paypal-sandbox-button-goes-to-my-account-summary/44894972#44894972 ) and we were not able to to get any valid test data because of it. That is why we were asking for data from your site. Hopefully they fixed this is this allows us to test things properly.

    So with the working fallback code for old IPN it should be possible to upgrade your site and not loose renewing subscriptions. But it will take some time for our developer to prepare this plugin version and I'm at the moment not able to estimate time, I'm hoping few days.

    Again, I sincerely apologize for the confusion that was made on our side.

    kind regards,
    Kasia