I need the following extended functionality for the existing official "WooCommerce Memberships"-Plugin:
I need the user roles for members change, depending of a certain plan being active or not.
A user signs up for membership plan A: When he gains the membership, his role switches to user role "gold", when the membership expires, his user role switches to "free_user".
A second user sings up for membership plan B: When he gains the membership, his role switches to user role "silver", when the membership expires, his user role switches to "subscriber".
All the roles should be freely selectable by the admin in the settings for each membership plan (see screenshot mockup).
For information: There is already an official plugin, that does the job, it is called "WooCommerce memberships role handler" but it changes roles for ALL memberships globally based on ANY membership being active or inactive, but I need them to change based on a CERTAIN membership plan being active or inactive.