Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An unlimited use discount code created under certain conditions if seat cost is 0 #128

Open
3 tasks done
dwanjuki opened this issue May 15, 2023 · 0 comments
Open
3 tasks done

Comments

@dwanjuki
Copy link

dwanjuki commented May 15, 2023

Describe the bug
When the seats parameter is omitted from the $pmprosm_sponsored_account_levels array and if the sponsored seats are free, checking out for a sponsor level without creating any child accounts creates an unlimited use discount code.

An unlimited use discount code is also created if a parent account is imported from CSV.

To Reproduce
Steps to reproduce the behavior:

  1. Setup your $pmprosm_sponsored_account_levels array. Omit seats and set seat_cost to 0
  2. Check out for the sponsored level. Do not create any seats at checkout.
  3. Check Memberships > Settings > Discount Codes
  4. Observe that the discount code created has unlimited uses.

Expected behavior
Number of discount code uses is limited

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment

WP 6.2 PMPro 2.10.5 PMPro Sponsored Members 0.10.1
@dwanjuki dwanjuki changed the title If no seats are created at checkout and if seats are free, an unlimited use discount code created An unlimited use discount code created under certain conditions if seat cost is 0 May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant