I think I'm missing something – having issues with membership levels

Hello there :slight_smile:

I’ve been banging my head on this for a bit – I’m quite stuck. I’m working on a site for a client, and she plans to sell courses online (we’re using WooCommerce for that – we have to have bundled products, etc.). She wants there to be limited-access forums that go along with each course (that’s where BuddyPress comes in).

We’re setting up the course video content as custom post types. Initially, we were using WishList Members, but the documentation is sad, the code is encrypted (?!! Isn’t that against WP’s GPL?) and the support is miserable. Then we discovered it won’t work with BuddyPress/bbPress. So I decided to give Memberships a shot.

What was nice about WishList was that we could just check a box on the post itself (as to whether or not that post should be protected), and then we could check a box (or multiple boxes) of what membership levels could access that content.

What I’m getting from Memberships is that you have to set “Access Levels”, which is fine, but I’m having seriousissues getting them to work properly. For example: I set up a “Stranger” level. It’s very basic – jut created it, and added in a “Negative” so that my Custom Post Types were inaccessible to non-logged-in visitors, using the URL Groups with regular expressions. (i.e. “http://testsite.com/courses/.+”, so anything under “courses” was “protected”.) Then I set the associated user role as BuddyPress’ “Spectator”.

This is working fine, but as soon as anyone logs in, ALL content is accessible. I tried setting up an Access Level that was associated with my category of custom post types – I basically cloned the “Stranger” level and moved the “negative” to “positive”, and changed “Spectator” to “Participant”. But what ends up happening is, when I apply this level to a user, the entire site becomes “protected” and ends up having a weird infinite redirect loop and the internet explodes.

I have no idea what I’m missing here.

In the end, what we WANT is, when someone purchases a course, they can 1) access the protected custom post type category (and all posts beneath it); 2) they have access to downloadable items that go along with the course (WooCommerce handles this); and 3) are given access to the forums that are associated with the course (this is on a limited basis – which I thought using Subscriptions would work for, since you can set access dates, but I need the access dates for the FORUMS to be limited, while the CPT access will be for forever).

I’ve read the documentation, but I’ve been following the steps, and just can’t seem to make this work.

I’m also wondering what will happen if someone buys 2 or 3 different classes at the same time – will they be able to access ALL of the associated forums and CPTs? If someone can hold my hand while I whine like a baby, I’d appreciate it :wink: (Mainly because next I have to figure out how to connect Memberships to WooCommerce. That’ll be fun.)

Any help or advice (or telling me I’m insane and can’t do this – which I hope you won’t say) would be appreciated!

  • aristath
    • Recruit

    Hello there @doodlebee, I hope you’re well today!

    First of all, let me say that the Membership plugin is a plugin that can give you FULL control of what you want to do. That is its advantage, but at the same time you have to understand that it’s also very easy to mess things up due to its complexity.

    When you set up negative rules, all content on the site is visible except the content that matches your rules.

    When you set up positive rules, the exact opposite happens: All content on the site is hidden, except the content that matches your rules.

    So suppose you have an access level that has only 1 positive rule:

    Access a page called “about”.

    If a user on that level tries to access your domain ( http://example.com ) he will not be able to because he does not have access to your homepage. If he tries to access the example.com/about page though he ‘ll be able to see its content.

    It’s always best if you choose 1 way of doing things and stick to that.

    Negative rules always have priority. So if a user has a subscription that has 2 access levels, one allowing access to /about and another one disallowing access to that page, he will not be able to access it.

    You’ll have to organize your structure so that it all makes sense to you and your rules.

    In your case, I would try to do everything using positive rules. I’ll explain why below:

    I’m also wondering what will happen if someone buys 2 or 3 different classes at the same time – will they be able to access ALL of the associated forums and CPTs?

    If you use negative rules to setup your levels, due to the priority of negative rules users will ultimately be able to access… nothing!!

    level 1 does NOT have access to courses 2 & 3 (that gives him access to course 1)

    level 2 does NOT have access to courses 1 & 3 (that gives him access to course 2)

    level 3 does NOT have access to courses 1 & 2 (that gives him access to course 3)

    If a user purchases all 3 courses, he will NOT have access to any of them.

    Now imagine the same scenario using positive rules:

    level 1 has access to course 1

    level 2 has access to course 2

    level 3 has access to course 3

    If a user purchases all 3 courses, he will have access to all 3 courses!

    I hope that makes things a bit more clear…

    I would advise you watch our new Membership tutorials on Youtube: http://www.youtube.com/playlist?list=PLV1BcivFAIdtF4p7CYVfMbVAJ4JQ1Rpe9

    make sure you watch them all… :slight_smile:

    Cheers!

    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.