How do I set up a form for an existing user to upgrade their role?
Basically, there have 2 roles for the user, one is the customer role which is the Woocommerce default register role, and another one is a premium membership.
I already set up a CRED form for newcomers to purchase for the premium role with the Toolset Form commerce.
But how do I set up a form just for the people who already register as a customer, and want to pay to upgrade for the premium role?
In your case, you want to allow the existing users to upgrade the membership to new one and update the user role accordingly. For that when if you follow the same Doc above and instead of using "Create new user" form, you should create a new user form for editing existing users and set this form to "Charge payment with this form".
Where:
- Replace 999999 with your original form ID.
- We assume that you have "Premium" custom role created using Toolset Access.
- You can adjust the above code to remove existing user role "customer".
if you just do not want to hide the password field, you can remove the password field by editing your Toolset form and remove the password field and save your form.