Support

Home Forums WP User Integration Ticket Capability Requirement + simple-membership-plugin

Ticket Capability Requirement + simple-membership-plugin

Posted: February 5, 2018 at 9:09 am


RodeoCES

February 5, 2018 at 9:09 am

I am trying to restrict tickets to certain membership levels I set up using the Simple Membership plugin. https://simple-membership-plugin.com/.

In this case, I created a membership level where the ID = 5 and the Membership Level name is “Open Show”.
Then I entered this information into an Demo|Open Show’s Ticket Capability Requirement field as [swpm_protected for=”5″]. To test this, I created a new member with Membership Level 5. I Logged in as this new member and message is “….is available to members only. On Sale”. I was expecting that this member profile should be able to see those tickets with [swpm_protected for=”5″].


Garth

  • Support Staff

February 5, 2018 at 9:41 am

Hi,

Event Espresso doesn’t use the roles directly because roles are groups of capabilities. Instead, Event Espresso uses an individual capability to determine if someone has access to see a certain ticket.

With our WP user integration add-on, you’ll be able to setup member pricing and also offer public pricing. It works by integrating with a membership plugin like Paid memberships pro or S2member.

Here is an example of how it works with S2member: http://ee-screenshots.s3.amazonaws.com/ee4/ee4-s2member-roles-tickets.jpeg

capability

You set a capability for a pricing option and then a member that has access will be able to register for those pricing options.


Tony

  • Support Staff

February 5, 2018 at 9:42 am

Hi there,

Then I entered this information into an Demo|Open Show’s Ticket Capability Requirement field as [swpm_protected for=”5″].

By doing this you are telling EE that only users with the capability ‘[swpm_protected for=”5″]’ can access the ticket (that capability will never exist).

The EE WP User integration add-on (which is what is checking for the minimum capability you have set) works based on capabilities assigned to the user’s account. It looks like Simple Membership does not assign capabilities to the user if they are a member and if that’s the case it will not work with the EE minimum capability check.


RodeoCES

February 5, 2018 at 1:19 pm

Thanks for the replies.
I took your advice and removed Simple Membership. I can’t use S2Member because of their stacked membership levels. Therefore, I’ve downloaded and tried to see if Paid Membership Pro will work for me. I also added Paid Memberships Pro: PMPro Roles (he plugin adds a WordPress Role for each Membership Level with Display Name = Membership Level Name and Role Name = ‘pmpro_role_X’ (where X is the Membership Level’s ID)) as recommended by this post https://eventespresso.com/topic/ee4-wp-user-integration-member-only-tickets/
I added 2 new members each with different levels of memberships, 1 or 2. I tested again and still doesn’t show the “tickets are available to members” message. I entered ‘pmpro_role_1′ for one ticket and ‘pmpro_role_2′ for another ticket in the “WP User Capability required for purchasing this ticket:” field. I also used pmpro_role_1 and pmpro_role_1 (without tags) thinking this might work.


RodeoCES

February 5, 2018 at 1:21 pm

**Correction** that should be… I tested again and it still shows that tickets are only available for members.


Tony

  • Support Staff

February 5, 2018 at 2:15 pm

Ok, so the new users you added are set to use those pmpro_role_X roles correct?

Use the User Role Editor plugin to view the capabilities on the role and confirm there is a pmpro_role_1 on the user account that has been assigned to that role.


Josh

  • Support Staff

February 5, 2018 at 2:18 pm

Hi there,

You’ll actually need to input a unique capability into the Ticket Capability Requirement field. It appears as though you’re inputting the role name into that field. So you’re almost there. This plugin will let you add special capabilities to those roles:

https://wordpress.org/plugins/user-role-editor/

Then after each role has its own capability, you can set the capability into the Ticket Capability Requirement field.

If you’re interested in a one-plugin solution for membership, user roles, and user capabilities, I can recommend checkout out this plugin which has all 3 features:

https://wordpress.org/plugins/members/


Tony

  • Support Staff

February 5, 2018 at 2:20 pm

Also, it has been a little while since I’ve looked at PMP with the PMP Roles plugin.

If you can send me a copy of that plugin to support[at]eventespresso.com I’ll install it locally and investigate further to confirm the capabilities you’ll have available.


RodeoCES

February 5, 2018 at 3:06 pm

Tony-
It worked. I had to go to the member user profile (dashboard/Users/All Users) and update the role from Subscriber to Open Show. These membership levels weren’t there before but was added when I uploaded Paid Memberships Pro: PMPro Roles. Once I updated the new roles, I was able to view appropriate tickets for each member. I also sent you the dropbox link for the add-on file.

Josh,
I honestly didn’t do anything more than just find the new roles in the member profile. And using pmpro_role=1 without any apostrophes or quotes. I am going to take a look at Members by Justin as well. I am interested since my memberships are free and I can add members to multiple roles.


Tony

  • Support Staff

February 5, 2018 at 3:17 pm

As long as the plugin you are using is capability based (ie: it gives ‘members’ specific capabilities on their account when they are ‘active’ members and removes those capabilities when the membership expires) you can the plugin with EE.

EE just checks for a capability on the account, it doesn’t care how it got there or how it was removed, your account either has that minimum capability (can purchase the ticket) or it doesn’t (can’t purchase the ticket).

Some membership plugins (like Simple membership and PMP without the above add-on) manage membership outside of the user’s role/capability with specific functions to check if a member is ‘valid’ or not. Those can’t be used with EE as there’s no difference between a ‘user’, ‘member’ or ‘expired member’ capabilities for EE to check on.


RodeoCES

February 9, 2018 at 1:54 pm

Okay – I understand.
BTW – Members worked just fine without any modifications to the code.
Thanks for the suggestion.

The support post ‘Ticket Capability Requirement + simple-membership-plugin’ 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.

Event Espresso