I need that my plugin will allow me to do the following, in order.
1. A user registers with my site as a "member" for free
2. They decide they want to upgrade to a paid membership - "premium member"
3. They go to the "upgrade membership" page and buy the subscription
4. The system automatically changes their role from just "member" to "premium member" or "gold member" (I have custom roles on my site)
What can i do?