Skip Navigation

[Resolved] Is it possible to exclude the protected product by toolset access …

This support ticket is created 2 years, 9 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/Karachi (GMT+05:00)

Author
Posts
#2304851

Tell us what you are trying to do?
I want to exclude toolset access protected products from viewing in the shop listings (standard woocommerce loops).
I dont know how i can exclude it, now it displays only in the listings, the product is protected. is it possible to exclude this products from the woocommerce listenings?

Product X is toolset access protected
Product Y is not

So both are displayed at the product-category page (standard woocommerce) the product itsef is protected. but should also not displayed in the product-category archive.

Maybe i am on the wrong way. Thank you and kind regards.

Is there any documentation that you are following?
no 🙂
Is there a similar example that we can see?
no 🙂
What is the link to your site?
Its in development now. no access possible.

#2305457

Hi,

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

Based on what you've shared, I'll assume that you're using the Access post groups, to limit access to the specific products.

The access post group restrictions are not automatically applied to archive pages, like shop or product category archive pages.

To extend that restriction to your archive pages, you'll need a custom shortcode that can check whether the current post should be accessible to the current user or not and return '1' if it is allowed.

Example code snippet available at:
hidden link

After that, you can wrap the output of your archive loop items within a conditional check that checks the value of this shortcode and only shows the post/result, if the value is equal to '1'.

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

regards,
Waqar

#2305993

My issue is resolved now. Thank you! Great support!