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

Old approval data isn't cleared if the user changes their level while pending approval #184

Open
3 tasks done
dwanjuki opened this issue Apr 30, 2024 · 0 comments
Open
3 tasks done

Comments

@dwanjuki
Copy link
Contributor

Describe the bug
If a user changes their level while pending approval for another level, details of the pending approval are not cleared from the database.

This can cause an incorrect count to display in the approvals notification badge.

image

To Reproduce
Steps to reproduce the behavior:

  1. In a level group that does not allow multiple selections, set up levels that require admin approval
  2. Complete checkout for a level in the group requiring approval.
  3. Complete checkout for a different level in the group.
  4. Search the usermeta db table for pmpro_approval_ entries associated with your user ID.
  5. See that entries exist for the first level checkout

Expected behavior
If a user's level changes while pending approval, the previous level's pending approval data is cleared from the database.

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.5.2 PMPro 3.0.3 PMPro Approvals 1.5.1
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