Skip Navigation

[Resolved] active subscription conditional

This thread is resolved. Here is a description of the problem and solution.

Problem:

I need to add a conditional that only displays content if the current logged in user has an active woocommerce subscription. Please advise how I can do this.

Solution:

I suggest you try these:

1) if the current logged in user has an active woocommerce subscription, setup them as user role A,
If not, the subscription is expired, then setup those user in another user role B

https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/how-to-use-the-woocommerce-subscriptions-plugin-with-toolset/

2) Then you will be able to use Access plugin to display the content depends on the user's role

Relevant Documentation:

https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/

https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/

This support ticket is created 6 years, 4 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
- 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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 6 years, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#1114153

Hi I need to add a conditional that only displays content if the current logged in user has an active woocommerce subscription. Please advise how I can do this.

#1114878

Hello,

I suggest you try these:
1) if the current logged in user has an active woocommerce subscription, setup them as user role A,
If not, the subscription is expired, then setup those user in another user role B
https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/how-to-use-the-woocommerce-subscriptions-plugin-with-toolset/

2) Then you will be able to use Access plugin to display the content depends on the user's role
https://toolset.com/documentation/user-guides/limiting-read-access-specific-content/
https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/

#1115020

My issue is resolved now. Thank you!

#1115426

You are welcome