All new members showing incorrect expire date

Hello Team.
We just set up a new install of the membership plugin with two levels (visitors and registered users) with a free subscription plan and set it so that all of the existing wp users who already had accounts because registered users. We set it the plan with an indefinite date, HOWEVER when we look at the membership list from All Members, the all show an expiration date of 20 days from the day we turned it on, or a new registered user would show a date, 20 days from the creation of their new account.
The way I understood it the indefinite setting means it never expires, so why is there an expiration date and how do we fix that or do we even need to?
Thanks so much, we would liek to get that resolved ASAP as we have over 11000 users who would be upset with us if they sudenly could not get their content.

  • Mary
    • The Incredible Code Injector

    Ash, I PURCHASED a premium account for an organization I am working for, then discovered your software had set up a Paypal subscription so that I would be charged every year. I canceled the Paypal subscription, and NOW my Wordpress subscription shows it has been CANCELLED. Next year, and all subsequent years, the organization I am working for will be paying for the subscription, NOT ME. In the meantime, why does my subscription show it is cancelled, even though it is fully paid till next June?

  • Ash
    • WordPress Hacker

    Hello @Mary

    Sorry for the confusion.

    It is not really a billing question. It says I am paid up till next June 2015, but it also says my subscription is cancelled

    Do you mean about a scenario of the membership plugin? Or do you mean about your membership with us (WPMU)?

    Cheers
    Ash

  • Mary
    • The Incredible Code Injector

    Ash, Pretty amazing that you provide user support but can't even look up the status of the subscription. That I was aware, next to my name on this message box it says ELITE. Also, to the right of that it has my #11943. That should have provided you with the info you need. Doesn't it?? UNIMPRESSED!

  • Ash
    • WordPress Hacker

    Hello @Mary

    I am really not sure why you are being so unimpressed.

    When you asked the question you tagged the membership plugin with it. And now you are asking about subscription. So, I am confused so I asked you a simple question in my earlier reply. Is your question about subscription related to membership or related to your account with us (WPMU)?

    Pretty amazing that you provide user support but can't even look up the status of the subscription.

    Yes, I can check your subscription and that's why I asked the previous question, to be sure. Also, we are providing user support, but it is 'technical' support. This forum is only for technical support. We forum staffs can't help you with account, billing, subscription or refund related questions, but only technical questions.

    I stated in one of my earlier post:

    We forum staffs are not trained to deal with billing related question

    Every department is separate here. So, for only technical issue related to wordpress, we forum staffs can help you. For any other related issue, you need to contact via contact form: https://premium.wpmudev.org/contact/
    Then the appropriate department will contact you and will solve the issue for you.

    I am sorry for the confusion that is made, please feel free to ask if you have any more questions.

    Cheers
    Ash

  • Mary
    • The Incredible Code Injector

    Ash, Your replies sound like "subscription" and "membership" are two different things, yet the first screen that appears after I log in says:
    Mary
    Member since June 12, 2014
    Membership type: Yearly (gold level)
    Your Subscription Has Been Cancelled

    You should continue to have access until June 17, 2015.

    Prevent your membership from lapsing! You won't be charged until June 17, 2015.

    THAT is the problem. I explained WHY it says that on July 10 at 3:05 (it is above), yet all your 'answers' do not address something that I think is a tech support problem in the Membership OR Subscription software. This has nothing to do with billing. I paid for the 'subscription', and I am now a 'member', but the screen says my 'subscription' is cancelled for my yearly 'membership'.

  • John
    • Flash Drive

    Hi Mary

    This sounds very much like two people separated by a common language - to quote someone famous.

    Although this may very well be a technical problem, it is occurring within your subscription to the Membership product - which I gather is a billing issue. Yes, it arises from a technical problem, but Ash is tasked with dealing with technical problems for people who are using the Membership plugin on their own sites.

    Hence the confusion - as far as I can see.

    Hope this helps.

    Cheers
    JC

  • Mary
    • The Incredible Code Injector

    John,

    THANK YOU so VERY much for clearing that up. I am very NEW to WP, and did not realize she was providing support for a plugin. I wondered why she asked Is your question about subscription related to membership or related to your account with us (WPMU)? I thought she was saying my subscription was not associated with my account. dahhhhhhh. :o)

  • Jack Kitterhing
    • Code Norris

    Hi there @PlanetWaves,

    Hope you're well today! :slight_smile:

    Sorry about the confusion here, I've done some testing and also checked the code, this isn't actually a bug and is more of a UX issue.

    The plugin checks if the subscription type is indefinite and if it is, it doesn't expire, it only checks for a expiry date if the subscription type is serial or indefinite.

    So even though it shows a expiry date, it doesn't actually expire (tested and confirmed by myself).

    The expiration date is taken from whatever is set in membership > subscriptions, on that specific subscription.

    That shouldn't show to the end user though, only you as admin, we're re developing the whole UI and UX in 4.0, so there won't be this room for any confusion.

    If you're interested to look at the relevant parts of code that handles the indefinite subscriptions, you can check in membership/classes/Membership/Model/Member.php

    You'll be wanting to take a look at lines, 179, 683 and 789.

    Any issues at all, we're here to help. :slight_smile:

    Thank you!

    Kind Regards
    Jack.

  • John
    • Flash Drive

    Hi Jack

    It looks to me as though you add ten years to the "expiry" date if it happens to come up - so it doesn't expire.
    It might be cleaner to set it to a known date in the future so that never happens - say 21 Dec 2112 - well past the time this piece of software will be in use.

    Your comment that's it's a UX issue doesn't help the user though - so the sooner the UX issue of telling the subscriber when they subscribe that they will have to pay again some time in the future is certainly not helpful.

    It's the logic that brings this message up that us disturbing us the most I think.

    I set my "indefinite" subs (about 40 of them) at 10 years. I think that when you select "indefinite" it should not allow you to put anything in the expiry fields, and simply display that it will "never" expire.

    Cheers
    JC

  • Michael Bissett
    • Recruit

    Hey @John,

    Upon further investigation, I found something interesting. There is one situation where the the expiration notice for a infinite duration subscription shows up to an end user.

    It's when the "PayPal Single Payments Gateway" is employed for a subscription (see screenshot below). With any other gateway, that message doesn't pop up, it only says:

    You are on an indefinite membership.

    The code that tipped me off to this possibility was located in lines 307-308 of membership/classes/Membership/Render/Page/Subscription/Renew.php, with the mention of "$gatewayissingle".

    I've notified our developers here, so that they can have a further look, and see what can be done about this.

    Regards,
    Michael

  • John
    • Flash Drive

    Thanks Michael

    Appreciate the feedback - very interesting.

    BTW - I had a second issue pop up this morning - I should raise a ticket for it, but I installed Reader and it came up with an error that required me to edit the file and deactivate the plugin. Should I raise a ticket?

    Cheers - JC

  • Ash
    • WordPress Hacker

    Hello @John

    Reader is a multisite only plugin, it is not compatible in single site.

    If you install it accidentally in single site, you need to remove the Reader folder via ftp. You will find the Reader folder in /wp-content/plugins/ folder in your server.

    Cheers
    Ash

    • Vaughan
      • Support/SLS MockingJay

      Hi @john, The developer has made some changes to the dashboard plugin to address this issue, thanks for bringing this to our attention. Now multisite plugins shouldn't be able to be installed via the dashboard notices or plugins page.

      Hope this helps

  • Jack Kitterhing
    • Code Norris

    Hi there @John and @PlanetWaves,

    Hope you're both well today! :slight_smile:

    @John We've already changed how indefinite subscriptions are handled in our re-write (Membership 4.0), so they no longer require a end date to be entered :slight_smile:

    @PlanetWaves

    We are not on multisite, but do we know how to fix this issue yet? We would really like an answer as some of our users are due to expire.

    The issue with it showing the text to the member has been raised to the lead developer.

    With regards to the expiry, even if you are using that gateway and it shows that message, they won't actually expire, it's just currently showing that, but they will still have access to all the content as they should.

    In the mean time, while that is being fixed, you could edit the subscription page and add a message just to let users know, that despite the message, they still have access as they should.

    We're working to get the incorrect resolved ASAP. :slight_smile:

    Thank you!

    Kind Regards
    Jack.

  • John
    • Flash Drive

    Thanks for the update Jack.

    I wonder if you were able to make the other change I raised separately, which is to have a specific expiry date for a subscription, rather than a number of days after subscribing or enrolling.

    You had lodged it as a new feature request. It would make a significant difference to my business for one. Example:

    Enrol on the 27th July - expire on the 20th August.
    Enrol on the 15th August - still expire on the 20th August.

    This is necessary for enrolments for a specific event or course, rather than the rather mundane expire after 30 days or 60- days from the enrolment event.

    Thanks again - JC

  • Ash
    • WordPress Hacker

    Hello @John

    As these are marked as feature request, so it depends on the thoughts of other members. Other members can vote in that thread to reflect their thoughts on it.

    I believe when we will get a significant number of votes, our dev team will consider it to integrate.

    Cheers
    Ash

  • Jose
    • Bruno Diaz

    Hi @PlanetWaves,

    Hope you are doing great today!

    I was looking into the code and, unfortunately, there are no hooks available to change this without altering the plugin core.

    If you are open to modify the plugin, this is what you need to do:

    In the file ..\wp-content\plugins\membership\membershipincludes\classes\membershipadmin.php replace the lines 2460 to 2472 with the following code.

    <?php // LEVEL EXPIRES COLUMN // ?>
    <td <?php echo $style; ?>>
    <?php
    $usersubs = $user_object->get_relationships();
      if ($usersubs) {
    	$exps = array();
    	foreach ($usersubs as $sub) {
                $subscription = $factory->get_subscription($sub->sub_id);
                    if (!empty($subscription)) {
                       $levels = $subscription->get_levels();
                       foreach($levels as $current_level){
                          if( $current_level->sub_type == 'indefinite') {
                              $exps[] = __('Indefinite', 'membership');//You can set a date in the future like this: strtotime( '+10 years', $expires );
                                                                    break 2;
                          }
                       }
                    }
    
                $exps[] = date("Y-m-d H:i", mysql2date("U", $sub->expirydate));
    
       }
       echo implode(", ", $exps);
    }
    ?>
    </td>

    I'm also attaching the patched file, so that you don't need to touch the code. Just replace the file and it should work.

    Now, it will say'Indefinite' if any of the levels related to the subscription is in mode indefinite.
    For finite and serial mode, it will print the expiry dates as usual.

    Please let me know if you need further support on this.

    Thanks for your patience :slight_smile:

    Cheers!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.