We run a membership through our Wordpress/Woocommerce system. We’ve been using Discourse on a subdomain with the SSO for a couple years and it’s been working great. I have code in my functions file that adds/removes Group access when the person joins/cancels respectively.
We’ve added a feature in our membership where people can join a small group of 6-8 people for weekly Zoom calls.
To manage this, we have created a Wordpress Post Type called “Cohorts” that has the weekly call information in it and then assigned those Cohorts to a User using custom user fields.
Here’s what I would like to do:
- Create a Group for each of the Cohorts
- Create a Subcategory for each of the Cohorts that only the Group from #1 has access to.
- Put each of the Members in their respective Group which will give them access to their, and on their, subcategory for their Cohort.
I know how to do #3, but is there a way to programmatically add Groups and Subcategories (with the security settings)?
I can’t find this functionality in the WP-Discourse utilities. Also, looking at the API, I can see where to add categories, but not the security functions.
Is what I want to do possible?