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

Make compatible with Multiple Memberships per User #22

Closed
strangerstudios opened this issue Aug 3, 2017 · 3 comments
Closed

Make compatible with Multiple Memberships per User #22

strangerstudios opened this issue Aug 3, 2017 · 3 comments

Comments

@strangerstudios
Copy link
Collaborator

If a user has more than one level, they might have access to a post via one level but still be pending for another level. In this case, we want to give them access to the post.

We would need to update this line to loop through all levels:
https://github.com/strangerstudios/pmpro-pay-by-check/blob/master/pmpro-pay-by-check.php#L475

If the user has any of those levels and is ! pending, then give them access. Otherwise don't.

The pending function needs to be updated to do something with the level_id passed in.

@strangerstudios
Copy link
Collaborator Author

Should we also filter pmpro_has_membership_level to return false if a user is pending. If so, we can just check if pmpro_hasMembershipLevel for all of the levels the post is locked down for and return true if the user has any of them.

@strangerstudios
Copy link
Collaborator Author

Here is how the approvals plugin filters pmpro_hasMembershipLevel https://github.com/strangerstudios/pmpro-approvals/blob/master/pmpro-approvals.php#L407

@kimcoleman
Copy link
Member

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