Skip Navigation

[Closed] How to control cpt publish status with woo 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.

This topic contains 3 replies, has 2 voices.

Last updated by Adriano 6 years, 12 months ago.

Assigned support staff: Adriano.



I am using Toolset + Woocommerce and Woocommerce subscriptions.

The idea is that a member subscribes and gets access to write a custom post type (using a cred form). They will be able to create the content, which is then approved and published by an admin. Once it is published the user (and admins) can then edit the post as and when needed. When their subscription expires the post should then be unpublished. They should be able to renew their subscription and their cpt remains published

On subscribing they are also given a specific role and their access to some content on the site is controlled using Access.

I know that I can use the automatic expiry on a cred commerce form but this would not necessarily tie in with their subscription dates and I am not sure how this would work when it comes to renewals.

Any suggestions welcome.

Many thanks



I don't know how woo subscriptions works, but when you set up expiration date into a CRED form, you can define the status after post is expired.

When renewal is done, you just need to change the status of the post to "published", and the post will be available again.


Using Cred sets an automatic expiry date but then it seems it would then need to be manually renewed (ie republished) which is less than ideal - ideally i would like to be able to automatically match the publish status to the users role - is there a way to do this using Access?

For example when a user's subscription expires and their role changes from member to subscriber then this will automatically unpublish their custom post type.


No, this is not possible using Access. You can use it only to control what different users can do in the WordPress admin and what they can read in the front-end.

The only solution I would recommend is to find a hook of this plugin (Woo Subscriptions). Which lets you to add some code to unpublish posts by author.

You can use then wp_update_post to unpublish them:

Please let me know if you are satisfied with my answer and if I can help you with any other related question.

The topic ‘[Closed] How to control cpt publish status with woo subscriptions’ is closed to new replies.