• Resolved eddypiv

    (@eddypiv)


    I am selling digital content on my website, and subscriptions to that content.

    I noticed that when a visitor selects a membership and proceeds to the check-out, the value presented to him is the membership -/- the granted discount % assigned to that membership. So a member is paying the membership at a discounted price, even for his first membership, when he is not logged in!

    I have actually seen these purchases happening in my webshop.

    How is that possible, and how to resolve?
    See my memberships: https://share.getcloudapp.com/v1u279JA
    See the check-out: https://share.getcloudapp.com/yAubNe8l
    The discount for this membership is set to 10%.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I am also having this issue!

    Plugin Author Andrew Lima

    (@andrewza)

    Hi @afnguyen and @eddypiv

    I’m sorry to hear about this issue you are facing.

    I have tried to replicate this but I haven’t been able to, please can you tell me the exact steps I need to recreate this?

    What I have tried so far is the following:

    1. Set membership global discount to 10% for level 1.
    2. Created a WooCommerce product that assigns level 1 when bought.
    3. Logged-out of my test site/used private browsing.
    4. Added the product from step 2 into my cart and another product.
    5. No discount is applied at all, throughout this entire process.

    We will need more information to try and pinpoint why this is happening on your sites. Such as what versions, custom code and/or other plugins you may be running on your site.

    My test site is running WordPress 5.5.1, Paid Memberships Pro 2.4.4, WooCommerce 4.5.2 and Paid Memberships Pro – WooCommerce 1.7 (and the latest Storefront theme).

    Plugin Author Andrew Lima

    (@andrewza)

    I am setting up a brand new site from scratch to run a couple of tests to see if I can replicate it there.

    Any specific information regarding your site may help us pinpoint why this is happening on some sites.

    I’m sorry for the inconvenience caused by this.

    Plugin Author Andrew Lima

    (@andrewza)

    Thanks for your patience, I spun up a brand new site to test this further and I do see that it is giving a discount code to the cart if the user (guest user) has a membership product in the cart.

    This has been designed this way, to give potential members an ‘early’ discount. I’ve added this to our development schedule to have this as a filterable option. I am not sure why it didn’t happen on my first test site vs this new test site I’ve created to test it further.

    Here is where we calculate if the user has a level inside their cart or an active membership level and then discount it – https://github.com/strangerstudios/pmpro-woocommerce/blob/dev/pmpro-woocommerce.php#L429-L437

    To disable the discount prices for WooCommerce products if there is a product in the cart with a membership level (a product that assigns a membership level when purchased) – you may use this code snippet:

    https://gist.github.com/andrewlimaza/fb9952047def951dc36121fd782e118d

    This code snippet will force customers to have an active membership level to get the discount, not just having the membership inside their cart.

    Thread Starter eddypiv

    (@eddypiv)

    Yes, that solved it.

    Thanks a lot for your help!

    • This reply was modified 4 years, 5 months ago by eddypiv.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Membership discount is applied to non-members’ is closed to new replies.