Trial period not working in M2

Looking to make a Trial period work, without asking the members to fill up the payment details during signup. Disabled the following code, in wp-config.php
define( "MS_PAYPAL_TRIAL_SUBSCRIPTION", true );

Still the new signups are getting added as active members, and not as trial when tested. Please check the chat notes.

  • Nithin

    Hello Dr. Berge,

    Hope you are doing good today. :slight_smile:

    I tested in my system, and it works fine in my side. The users gets assigned a status of Trial.

    I could notice the issue what you have mentioned in your staging site, however, I then created a new test membership called "Test One" in your staging website, similar to the "Test Staging" membership, and this time it seems to work fine, during sign up.

    The member "tpone" seems to have a status of Trial at the moment. Would recommend you to test via the "Test One" membership, and see whether you are able to replicate the same issue again.

    I'm not able to replicate the same issue you got with the "Test One" membership, would recommend you to test, and see how that goes in your side with "Test One" membership, and let us know if you have any further query.

    Have a great day ahead. :slight_smile:

    Best Regards,
    Nithin

  • Dr48

    Dear Nithin,

    Thank you for that!

    I was able to replicate the issue -- the 'catch' is -- when the member is presented with the above screen shot AFTER they have entered their details etc -- they are then asked to click "sign up" (i.e. above scree shot you shared) to then continue and have access.

    However, if the user tries not to and/or decides to simply go to their profile link etc -- they do not have access. So, they MUST confirm on and click this 'sign up' button for access.

    The thing is, when they leave this page the only option then is to click 'account' where they can see they have an 'active' trial i.e. for one day. But, they are then shown that membership is 'pending' with no option to access and/or click the 'sign up' button -- they must either a) directly pay the account (although this doesn't seem to work as once pending is clicked the page bounces back), or b) cancel the account; but upon cancelling they are told they can 'renew' but that their membership/trial is still valid for one day -- so again, no access to their profile as they remain 'protected'.

    There seems to be an issue if the user does not click 'sin up' and then when you play around with the options, there's actually no way for that user to gain access if they choose to leave that page -- is it possible for this confirmation 'not' to be needed and/or for that page not to be needed i.e. for them signing up etc and completing the form in the first place is what is required...and then, they are granted access, opposed to this middle step which seems to cause a bit of a hiccup if the user decides to leave that page (which i'm sure quite a few will do) -- and then, trial duration etc is found under their account -- and when their account is due, a pending option will appear [confirming -- once pending payment appears, account access is then restricted -- this is how it 'should' work?].

    Is the above work flow possible to avoid 'losing' the signup/confirm page that is shown (i.e. the screenshot) and rather skipping straight to access -- BUT obviously it is integral that the permissions are only for the length of the trial period and after that has lapsed, for access then to be restricted again i.e. should the user choose not to continue, and to ensure they can't sign up for another 'trial' for free?

    Thanks Nithin, and thank you for all of your help!

  • Kasia Swiderska

    Hello Dr. Berge,

    I was able to replicate the issue -- the 'catch' is -- when the member is presented with the above screen shot AFTER they have entered their details etc -- they are then asked to click "sign up" (i.e. above scree shot you shared) to then continue and have access.

    I followed those steps and I can't replicate the issues originally described in thread (that new subscribers are active, but not on trial). I created test account and I clicked signup and status is Trial, not Active for my test user (wpmudevtest1).
    Can you point me to user which is suppose to have a trial account but it is active instead?

    . But, they are then shown that membership is 'pending' with no option to access and/or click the 'sign up' button -- they must either a) directly pay the account (although this doesn't seem to work as once pending is clicked the page bounces back)

    Default flow in this case is that they need to proceed to checkout page to 'complete payment" and then they see screen that they previously skipped where they can confirm subscription and start trial.
    I've tested that on my site and it works correctly. However on your site page reloads and nothing happens like you reported. I checked debug log and there was only issue with Taxamo add-on, which I disabled, but there was no change.

    Can I make more tests on your staging like switching theme and disabling other plugin? This will allow us to get to the bottom of this issue.

    kind regards,
    Kasia

  • Dr48

    Dear Kasia,

    Thank you for taking the time to check.
    To replicate, once you've completed the form and are presented with the 'sign up
    button -- head to another page under the user icon (top right corner) where the user then should have access to their trail period i.e. can access their profile -- but they can't unless they confirm and click 'sign up' it appears; once navigated away from this page there is no option in 'account' to confirm, rather redirect to pending payment and still, no access.
    The workflow essentially is to sign up for the membership which has a trial embedded with it (tied to the register link already) -- and after the trial period, to then have restricted access until the account has then been paid -- what we're trying to get around is the user being presented with a payment screen from the very beginning -- which is working -- but that sign up button needs to be clicked for access to all pages i.e. like a user would receive for their trail period (and then after...no access) -- after sign up they should be presented with the 'thank you' Membership2 page -- opposed to the 'confirming' page with the 'sign up' button -- this is how the current set up runs -- maybe this would work?
    The reason why the current set up needs to be changed is because the membership was/is set as a free membership tied to then 'a' paid membership but a loophole was found in the plugin where users can continuously sign up for 'free' after the trial has ended -- which is obviously not good.
    So to correct it, its trying to have the workflow where users don't have a payment screen UNTIL there trial is over and then need to proceed to payment gateway to have access (must not have access after this trial) -- and getting this right.
    At the moment 'most' things look like they're working, but this 'sign up' looks to be an issue -- and the 'thank you' page isn't being used now (for some reason) and this 'sign up' button's page is replacing it; if it can simply bounce to the thank you page, after the form is completed, opposed to having users to confirm by clicking 'sign up' this would be ideal -- and once the form has been submitted, the membership is activated (and the trial period begins).
    You may make changes on the staging site -- but please keep in mind this is a replica of a few days ago and isn't an exact copy of the main site -- however has been used for testing etc the past few days. A conflict test was run even and there was nothing that was found here.
    The test user on a trial is 'Billy' and has been recreated on my end quite a few times with the same issues.
    Would be rapped to find a solution here and to get this working -- the reason why it isn't being used on the live site is simply because we weren't aware of this loophole in the setup when advise to create the setup via support a few months ago -- so this is 'how' we've been advised then to fix this -- we just keep getting that confirmation page opposed to the thank you (current) which works well.
    Thanks again Kasia, I really look forward to solving this one :slight_smile:

  • Dr48

    Update: please see latest staging install as of today.
    Also, once form has been filled -- next page should be "thank you" [opposed to the screenshot mentioned and additional confirmation] by placing 'this' page instead of the other -- this should make a smooth workflow. Importance is placed on the user successfully being able to register without hassle, and for the payment to be prompted once trial period has ended (with no ability to sign up again for a trial -- rather they 'must' opt to pay their membership to continue access).
    Really looking forward to solving this one.

    Thank you kindly.

  • Dr48

    *alternatively note, workflow register form -- screenshot -- thank you page [but, the screenshot must remain accessible in the users 'account' if they choose to leave before clicking 'sign up' or accidentally leave the page -- when testing and after leaving the page, you cannot get this 'sign up' back and then the user remains without access -- key is to keep workflow and permissions while ensuring user has friendly sign up experience]

  • Kasia Swiderska

    Hello Dr. Berge,

    I'm sorry for the delay, but please note that our system prevents bumping threads, so posting few time in row push ticket down the queue and we are obligated to follow queue order (from older to newer). This can cause a delay.

    I apologize for my confusion, but I think we are not on the same page now - Initial issue was about users being active members instead of trial

    Still the new signups are getting added as active members, and not as trial when tested.

    Which we were not able to replicate on your site anymore.

    Next described issue was that when user were "breaking the flow" of joining membership with trial, then they could not get back "into flow" because something was preventing them from joining ("page bounces back").

    . But, they are then shown that membership is 'pending' with no option to access and/or click the 'sign up' button -- they must either a) directly pay the account (although this doesn't seem to work as once pending is clicked the page bounces back)

    This issue I was able to replicate on your site, however I did not replicate on my lab site. Hence I wanted to perform full conflict test on your staging.

    Right now I don't see any public (one members can join) and paid membership that has free trial. Only one membership with trial is private.
    Its not clear to me from your previous posts if you decided to change how this works on your site. Right now I can see you are using a free membership.

    From what I understand you want to remove "Signup" button screen that confirms joining membership and only show thank you page when users are registering for paid membership with trial.
    But this is not possible when membership is paid. Signup button will always show for those membership and it's necessary for the registration and joining flow (signup button is a confirmation for joining).
    We can't change that without rewriting plugin.

    Would really appreciate an update here -- please close this ticket so I can open another one that has the updated process -- the main issue of payment gateway (initial) needs to be solved nearing a week old now -- please help.

    If the issue is now different that initial question of this post you can create a thread from here https://premium.wpmudev.org/live-support/ (you can also talk with chat support agent to explain new problem with gateway and they will create a ticket for you).

    If you want me to still work on the broken flow of signing up to membership with trial, I will configure your staging to use trial membership again and then I will run all necessary tests. Please let me know.

    I am talking also with developer about the trial loop and seems that this was reported and they are working on preventing this in future versions.

    kind regards,
    Kasia

  • Dr48

    Dear Kasia,

    Thank you so very much for taking the to get back to me -- I was unaware of the thread bump etc, that wasn't my intention, simply to see it resolved as typically support replies quite quickly -- so my apologies if this added to the confusion.

    1. From the beginning of the thread re:
    "Looking to make a Trial period work, without asking the members to fill up the payment details during signup. Disabled the following code, in wp-config.php
    define( "MS_PAYPAL_TRIAL_SUBSCRIPTION", true );

    Still the new signups are getting added as active members, and not as trial when tested. Please check the chat notes."

    ---- this was on the old staging site (a new one had to be created) so does not exist.

    The issue to be solved recall:

    a) Yes, with the above re: not to complete payment details "first up" only when the trial period has expired.
    b) The current memberships are all under free THEN connected to a paid membership (this is due to support earlier in the year suggesting this workflow as a means of getting away from the immediate payment gateway -- back then, the above code was never mentioned).
    c) Due to the current payment methods being free (then attached to the paying memberships) -- there was a loop hole confirmed i.e. with the current set up a member can join, then after the trial has lapsed, choose not to pay, and simply sign up to another membership without ever paying (this was confirmed last week when talking with support as I queried it to be safe).
    d) Essentially the above (c) is what I am trying to fix whilst addressing (b) -- we found that if members were signing up, and then were given a payment gateway, they were confused -- thinkng they 'had' to pay straight away (although yes, it clearly shows when paying starts from, for example, this scared them away).
    e) The current workflow is simple -- click register -- fill in details -- begin trial :slight_smile: no other work needed....but, this needs to change to close the payment loop hole.
    f) In order to try to close this, what I have done is that I have hidden the 'free' memberships (i.e. that include the trial period) and this is now only linked to the 'register' button -- and then, now on the membership list (page) when users are registered and thus have access, will only be able to use this approach (i.e. a paid membership if they choose not to continue with the one linked to register i.e. free trial). But, this is only a temporary solution as I'm sure there's another loop hole in there somewhere!
    g) Finally! So, back to the initial code and what I am thinking: users sign up via register button -- ALL 'free' memberships need to be changed to 'paid' whilst still having the "free trial period" (as is) -- but then, since the membership is paid, once their trial has ended, they will need to obviously pay their membership to have access = workflow to be changed then would be --
    1) register (link to the updated 'paid membership with free trial') --
    2) complete form --
    3) thank you page = this is the current workflow that works, but i understand as you mentioned it needs to change i.e. the "sign up" confirmation page is necessary -- this works (so long as the above code then is inputted (?) to hide the direct payment gateway (so long as user then is directed to payment gateway after trial has ended and they cannot access restricted content unless paying their membership); however the problem back when the initial staging was active is that the sign up (confirmation page) has a button users must click (sign up) to confirm their membership -- BUT if a user chooses to leave this page without clicking the "sign up" button -- they a) have no access to content, and b) there is no option in their account to confirm this i.e. they just have a pending payment button in their account, so...To fix this, it was suggested a) to remove this page and simply go straight to thank you page, but as you said above, this is the workflow and can't be altered, so then b) if their can be a button then in their account that CONFIRMS their membership, rather than the PENDING icon/button simply then directing to the payment gateway...

    Update would then mean:
    1. Memberships of 'free' to 'paid' whilst still incorporating the trial period (i.e. as currently stands),
    2. Workflow to show -- click register button (linked to the updated membership from free to paid version) -- complete form --- receive confirmation page with "sign up" button -- once clicked to then have access to the trial period (to not be redirected to payment gateway) PLUS an additional step = (3 from above) with a confirm option in account, rather than pending, so users may access their trial without going to the payment gateway.

    Note -- a lot of the above could not be replicated because a) the memberships are still "as is" and showing as 'free' opposed to paid, b) i had hidden the free ones a few days ago for a short-term solution, c) the initial code was never inputted into this staging site (the one it was tried on, had to be deleted) -- so yes, I understand the confusion and why this thread got 'so long winded' with myself trying to share this -- which evidently just got lost.

    Simple solution -- change payment gateway workflow to not include PRIOR to the expiration of the trial period AND to ensure there is a confirm option in user account if they deviate away from the confirmation page during the sign up process. [to replicate this issue, simply create a 'paid' option that is then linked to 'register' button, then note how payment gateway appears (i.e. above code not inserted) and DO NOT click sign up after, simply click another option on the drop down menus, then go back to account to try to confirm this step, then note 'payment pending' status, rather than active trial period]

    Thanks for sticking with the thread Kasia! Hopefully the above is a solution so others can close this loop hole, too!

    Thanks again so much!

  • Kasia Swiderska

    Hello Dr. Berge,

    I've activated membership with trial on staging1 site and then I have run full conflict test on site to see if problems with signing up to that membership after breaking the registration flow was caused by some other plugin and theme.
    I was able to narrow down this issue to siteorigin-panels plugins. After it was deactivated I was able to successfully join this membership on 2 test accounts.
    Can you check your test account if you are able to now join this membership (I was using Guest membership for testing)?
    Also have you had before any issues with this plugin and Membership 2 Pro? Let me know.

    kind regards,
    Kasia

  • Dr48

    Dear Kasia,

    Thank you for the update --

    This is not the actual issue at hand :slight_smile:

    The site origin plugin works on all pages, accept for Membership2 sign up / registration page -- this is why these pages are in text v page builder [developers have reported previously:

    "This was done intentionally to allow for better searching, but as you've seen, there can be issues if you revert to the base editor. As such, we would recommend either not using page builder on that specific page or leaving Page Builder active. To clarify, the specific setting this is in regards to can be found at WP AdminSettingsPage Builder, Content and its the Copy Content setting."

    BUT please note, this is NOT the issue.

    As previously explained, it is a quite simple workflow fix I am after....'
    CURRENTLY if a paid (trial) membership is set up OPPOSED to free (which is current) the workflow is:
    1) registration form
    2) confirmation page
    3) payment gateway
    4) access content for trial

    BUT if the mentioned code earlier is inputted, you get:
    1) registration form
    2) confirmation page = MUST CLICK 'SIGN UP BUTTON*
    4) access content for trial
    *IF SIGN UP BUTTON IS NOT CLICKED = restricted access and must go to account where you will see pending button -- then to payment gateway (complete) then access..

    THE SOLUTION I am after:
    1) registration form
    2) confirmation page* (if necessary) otherwise simply thank you page
    3) access content for trial
    *IF confirmation page is necessary there MUST BE an option in account to click the 'sign up' button BECAUSE it has been found that users DO NOT click this, they will try to access content, then have no other alternative but to then click 'pending button' in account which then goes to payment gateway..

    *****the idea is to ensure users DO NOT need to complete their details in payment gateway UNTIL their trial period has ended*****
    *current workflow if a paid membership is tested (i.e. currently we have the free attached to the paid) is that users MUST click 'sign up' on confirmation page -- IT IS THERE ONE CHANCE i.e. if they miss this step then they are FORCED to go to payment gateway...

    Please please please fix "this" issue not the other and yes, please only test on staging -- thank you.

  • Kasia Swiderska

    Hello Dr. Berge,

    Here is this post https://premium.wpmudev.org/forums/topic/trial-period-not-working-in-m2#post-1318154 you have reported this issue:

    But, they are then shown that membership is 'pending' with no option to access and/or click the 'sign up' button -- they must either a) directly pay the account (although this doesn't seem to work as once pending is clicked the page bounces back),

    What is broken here is that when clicking "pending" is that page bounces back. This was preventing users who skipped clicking "Signup" after registration to join Trial.
    By default when user does that and then go back to account page and clicks "Pending" they are presented with the confirmation page where there is button to signup (same screen as they see after registration) where they can confirm and join the trial.
    They don't need to pay at this moment.
    It was broken, disabling SiteOrgin plugin restored ability to join correctly trial on site.
    This was the point of whole plugin conflict test.

    So right now if you use membership with trial your users will be able to join it at any point from the account page by clicking Pending and then Signup button. I have tested that for two of my test accounts.

    The site origin plugin works on all pages, accept for Membership2 sign up / registration page -- this is why these pages are in text v page builder

    Unfortunately SiteOrgin Panels plugin is causing issue described above. Only when it was deactivated I was able to join Trial from account page because it started to showing correct confirmation screen instead of refreshing page.

    THE SOLUTION I am after:
    1) registration form
    2) confirmation page* (if necessary) otherwise simply thank you page
    3) access content for trial
    *IF confirmation page is necessary there MUST BE an option in account to click the 'sign up' button BECAUSE it has been found that users DO NOT click this, they will try to access content, then have no other alternative but to then click 'pending button' in account which then goes to payment gateway..

    With the define

    define( "MS_PAYPAL_TRIAL_SUBSCRIPTION", true );

    disabled in wp-config.php (which I did, because it was enabled on the staging site) this is now the working flow on your site - with necessary confirmation page (confirmation will not show only for free memberships - it has to be there for any paid, even with free trial, membership).
    So right now 3 points you listed are working. As for the

    IF confirmation page is necessary there MUST BE an option in account to click the 'sign up' button BECAUSE it has been found that users DO NOT click this, they will try to access content, then have no other alternative but to then click 'pending button' in account which then goes to payment gateway..

    after disabling SiteOrging Panels plugin on staging site clicking Pending button did not brought payment confirmation, but screen for confirming Signup for trial (the same that shows after registration) where user can click and join trial.
    I'm not able to take a screenshots of this because looks like staging1 is no longer available, but I have tested that and it was working this way. Both my test users were able to join trial, even they skipped confirmation screen after the registration form.

    If you give me again access to staging I will record video of my tests on how it is working after changes I have made.

    kind regards,
    Kasia

  • Dr48

    Dear Kasia,

    Thank you so much!

    And my apologies -- i was under the impression that the initial issue (link shared) was resolved and did not, or was not, affecting nor a part of this issue..

    I understand what you're saying now -- thank you! :slight_smile:

    I have changed the memberships, as you would have seen, though the membership then connected to the register (button) ID needs to be updated [from 4559 to 10044] -- where is this located? Then i can see if the 'paid' membership (with trial) -- opposed to the 'free' current membership loop hole, can also then be corrected :slight_smile:

    At my end, for some reason when removing the page builder from the Membership2 pages, they are not reverting -- however the suggested setting from the developers has been unticked [comment earlier mentioned] and there shouldn't be an issue -- but this isn't improving...

    I have gone and drafted ALL Membership2 pages (for safe keeping) to see if the live ones will work (i.e. just text, no page builder) though again, i can't see this at my end. I do use the plugin thoroughly throughout the site, and do need it, so if the interference remains, I'd need to ask please for a solution as it is heavily used.

    I have shared the login details for staging in support access [not sure how to here to ensure privacy].

    Would love to get to bottom of this!

  • Kasia Swiderska

    Hello Dr. Berge,

    I have shared the login details for staging in support access [not sure how to here to ensure privacy].

    I logged in in support access but there is no message in Support Access with details to staging?

    I will be getting developer to check why SiteOrgin panel is breaking the flow as you said you need that plugin - and they will see if this is something we can fix in our plugin.

    Could you please send in the following via our secure contact form - ttps://premium.wpmudev.org/contact/#i-have-a-different-question :

    - 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 staging admin access details (login address, username & password)
    - any additional passwords needed for accessing staging
    - 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

    kind regards,
    Kasia

  • Kasia Swiderska

    Hello Dr. Berge,

    Thank you for sending access to staging site - I performed more tests to see if SiteOrigin builder will be conflicting on different site with Membership 2 Pro and Trial period, but even with BuddyBoss theme and the same PHP version (on the same hosting provider Siteground) I am not able to replicate issue with broken flow of joining trial, like it happens on your site.

    In this case I have to ask you to keep the staging1 as it it - because if the issue is not replicable on different site it means developer needs to investigate this directly on your site. So they will be checking code and debugging on staging to get to the bottom of the problem.

    The flow you mentioned that is at your end sounds great, I just haven't been able to recreate this at my end, but appears what I was talking about from the very beginning, so thank you -- i really look forward to solving this!

    Problem is that on your site you will not be able to recreate it when the Site Origin builder plugin is activated. Unfortunately even with the option "content copy" disabled issue still occurs on your site. To see the correct flow this plugin has to be deactivated.

    This is why developers need to check where the conflict is coming from. It is important to not change settings in the staging1 until developer will give a green light that issue is fixed.

    kind regards,
    Kasia

  • Dr48

    Dear Kasia,

    Great news! With the help of support i got it to work..
    Had to update membership ID
    Found the dead links and/or incorrect redirects
    Managed to go away from sign up page to other pages (protected) and now when user goes back to 'account' the sign up page now appears (previously it was not, as you'd recall, and this was a big issue)
    After all this time, it worked out :slight_smile:
    I am really happy -- long awaited solution.

    Thank you for your patience and help towards solving this issue!! If there was anything else done by the developers that i'm not aware of about this issue, I'd love to know what and how it some how was made so simple, to work, again :slight_smile:

    Thank you, as always, for all of your help, it is, and has been, immensely appreciated.

  • Kasia Swiderska

    Hello Dr. Berge,

    Managed to go away from sign up page to other pages (protected) and now when user goes back to 'account' the sign up page now appears (previously it was not, as you'd recall, and this was a big issue)

    Hmmm... That is unexpected :slight_smile:, because developers hadn't had chance to check this yet. My wild guess would be that in the meantime where this was not working and now when there is no issue something changed on site (WordPress update? Other plugins? Theme update) and fixed.

    But I'm glad to hear its no longer there. In any case it comes back, please don't hesitate to re-open ticket.

    kind regards,
    Kasia