Page restriction OR logic

Hello,

I would use the custom capabilities to restrict access to my content because I sell courses. These courses are available in two ways:

1- The user purchases the course he wishes.
2- The user purchases a subscription that allows him to see the courses corresponding to this subscription:

The basic subscription provides access to the basics course while the premium subscription provides access to premium class. Finally, the pro subscription provides access to all courses.

I would use the custom capabilities to achieve this. How to allow the addition of more capacity and use the logic “or”? For example, for a basic course would give: course_id OR basic_subscription OR pro_subscription.

I do not know if it’s clear?

Thank you for your help.
Ben.

Levels in s2Member are cumulative. CCAPs can ADD access to those levels but not take them away.

Level 1 can access Level 1
Level 2 can access Level 1 AND Level 2
CCAP1 can access CCAP1. If sold to Level 1 that member can access Level 1 AND CCAP1 and if sold to Level 2, that member can access Level !, Level 2, AND CCAP1.

There really isn’t any way to do “OR”. The closest you could come would be with Specific Post and Page Access Restrictions. (See WordPress Dashboard → s2Member → Restriction Options → Specific Post/Page Access Restrictions.) You could build packages using this functionality which could be used either instead of or in addition to any membership levels to grant access to posts/pages not accessible in any other way on your site.

@bencorbe The “OR logic” with ccaps can be build with custom code, as I explain in this article.

1 Like

Darn! How did I forget about [s2If]??? :blush:

Thank you for your help. I’ll cheat with that, too bad we can not apply directly to pages to be redirected to the subscription list instead of displaying an empty page.

Good night.
David.