Posted: December 22, 2020 at 2:49 pm
We are trying to restrict an event ticket to users with A restrict content pro membership ID of 2 or 4.
In the Ticket Capability Requirement field, we’re trying “in_array( 2, rcp_get_customer_membership_level_ids() )” as per the RCP documentation.
We’ve tried a few other combinations but haven’t gotten it to work. It’s restricting the ticket for everyone, regardless of membership level.
2. https://help.ithemes.com/hc/en-us/articles/360050095493-Can-I-hide-widgets-from-non-members- (has the code snippets for restricting content)
3. https://ee-screenshots.s3.amazonaws.com/ee4/ee4-s2member-roles-tickets.jpeg (Code sampe for the S2 membership system)
The option within Event Espresso checks for capabilities rather than user levels from X plugin. The reason we do this is to allow it to work with various different membership plugins and not just specific ones.
Content Membership Pro level ID’s are specific to Content Membership Pro, so the core EE code doesn’t check for those.
You can’t input code into the capability field, the means EE s going to check if the user literally has a
For the above check to work you’ll need a snippet that explicitly checks for Restrict Content Pro membership levels.
Do you always use the membership level IDs to compare with?
Will your tickets always be restricted to any one of levels input into the field, for example, you can set ‘2,4,5’ in the ticket capability field and that would be available to any members with level 2 OR 4 OR 5?
Thanks for the additional detail Tony…
I’m struggling to figure out what “snippet” would work here. iThemes (who bought Restrict Content Pro) are off for the holidays and aren’t helpful at the momemnt. Any suggestions on how I might suss that out?
Answers to your other questions: Most of the tickets we do will have tickets restricted to certain membership levels. Some tickets would be for multiple membership levels. yes.
As you’ve submitted a support token for this, i can create the snippet for you, however…
You said most ticket, meaning some will not have a restriction? That’s fine if so I’m just confirming how this will work before providing a solution that then gets you stuck later down the line.
With regards to multiple membership levels, that ticket will be available to each membership level, right?
So a ticket can be available to Member level 1 or level 2 or level 3
Users would not have multiple membership levels at the same time, correct? Meaning you don’t need something that will restrict a ticket unless the user is Membership level 1 AND level 2?
(That may sound like a strange question but we’ve had it requested previously)
Members will only have one membership at a time.
Hoping to get a resolution to this today; my Client is planning a New Year’s promotion where tickets are going on sale.
Apologies for the delay but I’ve added the snippet to your site for this and replied to your support token.
Please let me know if the snippet works for you.
The support post ‘Restricting Ticket using WP User Capability and Restrict Content Pro’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.