Skip Navigation

[Resolved] Subscriptions multiple role changes

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#607669

Ive got a site,

People sign up and get the role Car Supplier, Decoration Supplier, Tyres Supplier.

However they can subscribe to Premium (Using woocommerce subscriptions)
https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/how-to-use-the-woocommerce-subscriptions-plugin-with-toolset/ I read this.

What I need to do is add a secondary role at sign up. So on my registration form they choose a role:
Car Supplier, Decoration Supplier, Tyres Supplier. Then when the form is submitted a script runs and gives them another role "basic", Then when they subscribe the role changes from Basic to Premium - leaving the orginal role alone.

How can I go about this with toolset please

#607796

What I need to do is add a secondary role at sign up. So on my registration form they choose a role:
Car Supplier, Decoration Supplier, Tyres Supplier. Then when the form is submitted a script runs and gives them another role "basic"

In the Subscription example described in that document, registration must be through a WooCommerce Subscription Form, not a CRED form. So our CRED API code cannot help you trigger some action when a WC Subscription form is submitted, because no CRED form is being used. The main role Toolset plays in the process described is it allows you to create custom roles using Toolset Access. Those roles can then be selected in the Subscriber Default Role and Inactive Subscriber Role configurations, but that's about it. Beyond creating custom roles, it's all handled by WooCommerce Subscriptions. I think WooCommerce support would be the best source of information about customizing that process and programmatically managing roles when Subscriptions are purchased.

#607818

Ok, another option would be 2 roles, Basic and premium.
Then I put users in categories?

Can I do a user taxonomy? I did a custom taxonomy called "Supplier Type" and selected it to Users using toolset but it doesnt show in users on dashboard.
But If I categorized users this would be a good work around.

Can you assist please.

#608331

Taxonomies cannot be associated with Users, but you could use a custom field. Create a field group for Users and add a select field with an option for each type of User. The values for each option should be unique strings formatted like slugs (lowercase, no spaces, can use hyphens). Then you can use this custom field in Views filters or in conditional HTML.

More information about User fields:
https://toolset.com/documentation/user-guides/user-fields/