Changing user roles upon subscription and recovering old role after expiry
-
Hello PMP
Here is a new question on a new topic as requested, edited to have my current question.
I have a question regarding the information provided here: https://www.ads-software.com/support/topic/change-memberships-level-vs-downgrade-user-do-i-need-both/
The original author of that question asked about changing a user role when someone downgrades. Currently I am testing a subscription plugin where users who sign up are given a new user role additional to what their original user role was. This means they will have two roles at the same time. The problem is, if different user roles are given different capabilities, there will be a conflict. Then when they downgrade because their subscription expired and they didn’t want to renew, they will get the website’s default role, which is not what I want.
My question is this: In PMP (with the code above, or some other way), is it possible to change user roles to different roles (ie, replace their original user role, rather than add a new one, so the user has only one role to avoi d conflicts) for different subscriptions?types?(not membership?levels) after their subscription expires, then when the user downgrades, they get their orginal role back?
For example: if I let people sign up as a student using a normal sign up process outside of PMP, then let them upgrade to a subscription via PMP to become a Premium Student, and other people to sign up as teachers via a normal sign up process outside of PMP, who can then upgrade to a subscription via PMP to become a Premium Teacher, the two types of subscriptions (student vs teachers) are not the same and each cannot be downgraded to be each other since their respective roles are not related and not higher level versions of each other.
If a Premium Student subscription expires, I’d like them to downgrade to back to their original student role, and when a Premium Teacher subscription expires, I’d like them to downgrade to their original teacher role, the two roles are not the same, and not the website default one.
Thank you
- You must be logged in to reply to this topic.