Skip Navigation

[Resolved] Setting up a directory website but not sure if I need WooCommerce Subscriptions

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Author
Posts
#2402881

Tell us what you are trying to do?
I am building a business directory website for an old girls' school association.

Users must be able to:
1. Purchase a directory listing product
2. Upload their directory listing content (front-end form submission)
2. Edit their listing whenever needed

Directory listings will be visible to the public.

We only have 1 directory listing product. However, this is an annual product - it costs X amount per year for the directory listing. So it's not a once off product.

Now, my question is: using the automatic post expiry option, would I be able to set an expiry date for 1 year after form submission? And would the user/client be able to receive an automatic reminder email that 1. notifies them their post is due to expire and 2. gives them the option to renew their directory listing for another year?

Or, is the above only possible using WooCommerce Subscriptions?

If I must use WooCommerce Subscriptions, how will users be assigned/linked to the posts (directory listings) they create? And how will the directory listings (custom posts) be automatically removed or publish status changed if the user does not renew the subscription?

At first glance, I thought this would be simpler to achieve with Toolset, but I've been reading the Directory Course content and support forums, and it looks like this is not as straightforward as it seems because I can't use the Toolset Forms with WooCommerce Subscriptions?

Please help - I simply want to know the best way users can renew directory listings after 1 year?

I have purchased WooComemrce Subscriptions already, but if I don't need this I'd like to try get a refund before the 30 days passes.

Is there any documentation that you are following?
https://toolset.com/course-lesson/charge-users-for-submitting-content/
https://toolset.com/course-lesson/using-the-woocommerce-subscriptions-plugin-with-toolset/
https://toolset.com/course/wordpress-directory-and-classifieds-sites/

Is there a similar example that we can see?

What is the link to your site?
Just started development - hidden link

#2403337

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

There are two different recommended paths when using Toolset with WooCommerce:

1. For products where only a one-time payment is involved:

In this path, you don't need WooCommerce Subscriptions and you can use a Toolset Form to complete the checkout process and accept the one-time payment, as explained in this guide:
https://toolset.com/course-lesson/charge-users-for-submitting-content/

2. For products where recurring payment is involved:

When recurring payments are involved, you'll need the WooCommerce Subscriptions. It will switch the user's role, based on whether the subscription is active or not, as explained in this guide:
https://toolset.com/course-lesson/using-the-woocommerce-subscriptions-plugin-with-toolset/

Through two different user roles (for example, "Active subscriber" and "Inactive subscriber"), you'll be able to control which content, pages, and forms, a particular user can or can not, access, including the ability to add or edit listings.

As for your specific questions:

> If I must use WooCommerce Subscriptions, how will users be assigned/linked to the posts (directory listings) they create?
- On successful subscriptions, users will be assigned the "Active subscriber" role, which will grant them the ability to add a new listing(s) or edit their existing ones, using the Toolset Forms. Toolset Forms will automatically set that user as the author of the created listing post, which will act as a natural link.

> And how will the directory listings (custom posts) be automatically removed or publish status changed if the user does not renew the subscription?
- For this bit, you'll need some custom code, which can detect the change in the user's subscription status.

a). If the subscription status changes to anything other than "active", it should get all the listing posts where the current user is the author and change their post status to 'draft'.

b). Likewise, if the subscription status changes to 'active' from any other status, it should get all the listing posts where the current user is the author and change their post status to 'published'.

To execute this custom function when the subscription status changes, you can use the "woocommerce_subscription_status_updated" hook from the WooCommerce Subscriptions:
https://woocommerce.com/document/subscriptions/develop/action-reference/#section-2

You'll find an example of a code snippet for a similar requirement in this support thread:
https://toolset.com/forums/topic/set-associated-member-profile-to-draft-when-woocommerce-subscription-ends/

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2407247

Thank you. I will use Woocommerce Subscriptions with some custom code as per your guidance.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.