[Resolved] Creating a teacher's directory

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.

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 8 months, 2 weeks ago.

Assigned support staff: Christian Cox.

Author
Posts
#1302275

I'm trying to work out what order to do things in order to achieve the desired sign-up process and and post display needs.

1) I want to be able to allow teachers to register and pay for a 12 month (renewable) registration on the website.

2) Registered teachers (guessing they will need a custom user role) will then have access to a post-creation form that will allow them to create a single post (only one per registration) so as to make sign-up and payment as quick and easy as possible. So, the relevant login details will be dispatched after registration and payment.

3) I want the posts which teachers create to be displayed only while they have a valid subscription - so if they don't renew (I'm assuming subscription or product renewals are possible). On a similar site I have which uses woo memberships and subscriptions I manually change the post status to draft and teachers don't have any way to change the status to published, but ideally I'd like this automated.

If all the above are possible, what do i need to do?

Thank you.

#1302439

Christian Cox
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hi, we have some information available for creating a membership site using WooCommerce and WooCommerce Subscriptions: https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/
You may find this helpful. It looks like, from your other comments, you've got some experience with these systems.

1) I want to be able to allow teachers to register and pay for a 12 month (renewable) registration on the website.
See the document above, there is a section for subscriptions. You'll need WooCommerce and the subscriptions extension.

2) Registered teachers (guessing they will need a custom user role) will then have access to a post-creation form that will allow them to create a single post (only one per registration) so as to make sign-up and payment as quick and easy as possible. So, the relevant login details will be dispatched after registration and payment.
In the membership documentation, you can see how to handle subscription payments and registration. To restrict access to a post creation form based on the number of posts already created, you can place the Form in a View filtered by post author, in the "no results found" section. It's basically using the View as a conditional. Check the FAQ section of this document for more details: https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/

3) I want the posts which teachers create to be displayed only while they have a valid subscription
There's nothing exactly like this built-in to the Toolset suite. To do it the right way, where the post is drafted/published based on subscription status, some custom code that finds and drafts a User's post would be required. It would have to be triggered any time a User's subscription status changes. One or more of these hooks might be helpful for triggering that code: https://docs.woocommerce.com/document/subscriptions/develop/action-reference/
I can help troubleshoot any code that touches a Toolset API or implements a Toolset-specific feature.