[Membership 2 Pro] Coupon code once entered showing error BUT still works

Hi there,
This has been ongoing for some time but wasn't able to be replicated until now -- issue is with M2 coupon use..

User goes to sign up and when they put in the coupon code they receive a 1 of 2 messages -- if successful then they get normal thank you page, if unsuccessful they get the sign up page BUT with the text saying an error occurred and that it didn't work BUT when they try to access the site their account works fine. So the issue is with an incorrect sign up page showing AFTER the coupon code has been entered and user proceeds to sign up.

To replicate, apply coupon code (support access open to see) and you will get 1 of the 2 messages -- there are several test users without membership to test with (denoted by their domain email).

Also users currently with this issue are either past users with inactive accounts signing up again, or active users with expired trial period.

Hope there's no issue replicating (note, this was happening prior to the beta version of M2 on this site so isn't related with the new install).

Thank you kindly :slight_smile:

  • Ash
    • WordPress Hacker

    Hello Dr48

    I am sorry I am a bit confused. Do you mean coupon or invitation code? Let me explain.

    Coupon is used to provide a discount for a paid membership. So, if you put a wrong coupon, it will fail but still you can proceed to the payment and if you pay, then you will be added to that membership.

    Invitation code is used to set a restriction to join in a membership. So, you must put a valid invitation code to join in that membership. Now, if you put a wrong invitation code, you will still be registered but you won't have the membership. You can't block the registration, as the membership assignment is done after the registration.

    So, would you please explain it again, maybe rephrase? Because, I am a bit confused with this - "BUT with the text saying an error occurred and that it didn't work BUT when they try to access the site their account works fine". They always have an account but may not have a membership. Would you please check and confirm?

    Have a nice day!

    Cheers,
    Ash

  • Dr48
    • Site Builder, Child of Zeus

    Hi Ash,

    Thank you for the reply -- this is about the coupon code for M2 and the work flow.
    Apologies for the wording, let me try again -- user uses correct coupon code (I'm testing on love site) but although coupon works user is told it does not i.e. the next page they see on sign up, rather than M2 "thank you page" is the sign up page with a simple error text saying the code didn't work. Now, since I'm the one testing I then proceed to click on protected pages etc that only a registered user can access and these users, despite the coupon code error, have access. So as far as permissions and registrations, the coupon code works fine. The issue is that with some users when testing it says it does not work (even though I can tell it does despite what the page says).

    I hope this is clearer, my apologies for the earlier confusion Ash :slight_smile:

    Thank you kindly :slight_smile:

  • Ash
    • WordPress Hacker

    Hello Dr48

    I have gone ahead and tried a registration with sandbox gateway, used a coupon and it worked fine. I didn't see any message like that. Definitely, I am missing something.

    Also, I noticed, your membership price $15 but you have a coupon to give discount $45.

    I have marked this thread private, so anyone else can't access this thread. Would you please make a video screencast and paste the link here so I can try the exact steps that you are following?

    Have a nice day!

    Cheers,
    Ash

  • Dr48
    • Site Builder, Child of Zeus

    Hi Ash,

    Thank you so very much and my apologies for the delay in reply.

    Yes, the membership is $15 (per quarter) so the coupon is essentially for 9 months (a couple I like to test). Finally, I was able to replicate -- as some users have no issues, and others will get the sign up error (although, they still have access etc regardless, so the permissions work fine, it's simply the random page that shows after opposed to the 'thank you' page).

    Here's the link: https://topicthread.com/wp-content/uploads/2018/11/Jennifer-sign-up-issue.mov

    Don't worry if you can't replicate immediately as it is random and goes through fine for some, just not for others.

    Thanks so very much Ash, greatly appreciated :slight_smile:

  • Nithin
    • Support Wizard

    Hi Dr48 ,

    Hope you are doing good today. :slight_smile:

    Thanks for the video, that was really helpful. I tried to test in my local server with a similar configuration, and I wasn't able to replicate.

    Could I know via which exact protected page are you clicking the signup link as shown in your vide, so that I could also check how that page is configured in your website. A link to the page would be helpful.

    Since support access wasn't enabled in your system, I wasn't able to check this further in dashboard side. Please grant access from WPMU DEV > Support > Support Access > Grant Access, so that we could give a closer look at the plugin settings, and see whether it's something which could be replicated.

    Please let us know once you enable access, so that we could get this sorted. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Dr48
    • Site Builder, Child of Zeus

    Hi Nithin,

    Thank you for taking a look!

    All primary pages are predominantly protected (with support access granted you'll see this in M2 and the pages).
    To replicate (although as mentioned, it is sporadic with some users having no issue, then others getting this error) -- simply login (you're welcome to use a test account) and then once logged in when user goes choose paid membership (https://topicthread.com/memberships/) you'll notice a coupon code area is available -- once code is placed inside -- then user hits "sign up" -- this is where the issue stems -- so from memberships > coupon code > sign in > "potential error page" i.e. sign up failed -- however, keep in mind even though it says this, it works, as protected pages are no longer protected :slight_smile: It is just a mix in the wording being shown.

    Hopefully you can recreate -- for some reason it is sporadic and has been happening for some time, so I'm sure it may be a bit tricky to track down given it took a while to record a user getting the false sign up.

    A big thank you for taking a look :slight_smile:

  • Dr48
    • Site Builder, Child of Zeus

    Hi Kasia :slight_smile:

    Thank you for taking a look! The expiry just happened so I've extended it -- the issues were happening while it was still active (it only expired a few days ago and the issue has been ongoing).

    It is however sporadic, so some users will experience no issues whilst others will receive the error (although permissions are correct).

    It's quite strange since the error isn't consistent but hopefully with the screen record you might enjoy able to narrow it down.

    Thank you kindly for your expertise :slight_smile:

  • Nithin
    • Support Wizard

    Hi Dr48,

    I gave a closer look regarding this, and tried creating couple of new users user in your dashboard, and performed similar steps as shown in your video screencast, but it seems to work fine with all. The last user created is "wpmusix", I have deleted the rest.

    I then tried to setting up a similar configuration in my local server, and I'm afraid, I'm not able to replicate this behaviour in any way.

    Could you please check with "wpmusix"user created, and see whether you could replicate this again, in any way?

    As you have mentioned, it's pretty tough to say what's causing the issue without seeing it live, or knowing the steps to replicate this. Does this happen with users who had memberships before? or it's only for new users?

    If you think there is anything being missed with trying to replicate it, please do pin point that out, so that we could have a better idea.

    Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.