Support

Home Forums WP User Integration Members Only Pricing Question

Members Only Pricing Question

Posted: April 3, 2013 at 9:32 am

Viewing 11 reply threads


Chris

April 3, 2013 at 9:32 am

Is there a way to specify certain members qualify for member pricing and others do not.

For example one of our members is late in payment for their invoice, he is still an active member of our website but we don’t want him eligible for a members discount.


Josh

  • Support Staff

April 3, 2013 at 9:59 am

Hi Ed,

You could temporarily disable their account by going to Edit their WP user profile and change the role to ” – No role for this site – “. This will keep their account on the site, but they will not be able to log in to the site as long as their user role isn’t set. Since they can’t log in, they will not be able to get member’s pricing.

You can reassign a role later on once things settle up.


Chris

April 3, 2013 at 10:06 am

Hi Josh,
Thanks for your reply.

This would be an issue because I need them to login to see what they owe or pay via a paypal link. Plus with my testing a person with no role for this site is still able to login.

Thanks for your help.


Josh

  • Support Staff

April 3, 2013 at 11:03 am

Hi Ed,

If you send them an email payment reminder, they should still be able to pay via PayPal even if they are not logged in.

There may be something on your site (like a plugin) that is changing the default WP -no role- behavior, when I test it out by trying to log in as a user without a role, I get a “You do not have sufficient privileges to access this page” message. This is consistent with the explanation I found in this thread:

http://wordpress.org/extend/ideas/topic/disable-user-accounts#post-20874


Chris

April 4, 2013 at 3:10 pm

I tried it on a site running nothing but event espresso and twenty twelve as the theme. It does actually say “You do not have sufficient privileges to access this page” but if you go back to the front end you are logged in with the wordpress admin bar across the top and EE still considers you a member for members only events.

I guess for now the answer is no. That would be a really nice feature for the upcoming version of EE. Basically checking capabilities instead of logged in or out. Maybe if user can read.

> read
>Since 2.0
>Allows access to Administration Panel options:
Dashboard
Users > Your Profile
> Used nowhere in the core code except the menu.php


Josh

  • Support Staff

April 5, 2013 at 12:34 pm

Are you going to take away the read capability from this user?

In this case, you could try changing lines 213, 369, 387, and line 428 of the member_functions.php file of the current WP user integration add-on to say:

if (is_user_logged_in() && current_user_can( 'read' )) {

This adds an additional check to make sure the user has the read capability before putting the member price on the registration page.


Chris

April 5, 2013 at 12:45 pm

My understanding is that all the read capability does is allow access to the dashboard for editing profile. So by setting the user to -no role for this site- will remove the read capability.
Is that your understand too – Link to WP codex

Is this something that would become a part of EE core? Or would doing this cause me to watch out for updates?

Thanks for your help.


Josh

  • Support Staff

April 5, 2013 at 1:04 pm

I think you’ll need to remove the read capability from the specific user account by using a plugin like advanced access manager. I tried out the code changes for a user account set to -no role for this site- and it didn’t seem to make a difference. Removing the read capability for the one account did the trick though.

This isn’t something that would go into Event Espresso core, instead it’s something that might go into the WP user integration add-on because that’s where all the WP user related features are.


Chris

April 5, 2013 at 1:19 pm

Ok thanks, I think we have a handle on how we could accomplish this using the current version of EE. But what happens when 4.0 comes out? Is it going to be handling this in a way where we would have issues looking for capabilities?

Thanks


Josh

  • Support Staff

April 5, 2013 at 1:23 pm

Hi Ed,

4.0 will have its own wp user integration plugin. It’s a bit early to say how it will compare with 3.x’s WP user features. It’s possible that it will be more capability based, but it will not be started on until 4.0 is stable.


Chris

April 5, 2013 at 1:31 pm

Do you think we would still be able to successfully hack the capability functionality into it?
Thanks


Josh

  • Support Staff

April 5, 2013 at 1:32 pm

Hi Ed,

I will be able to answer that question after the add-on has been developed/retrofitted for 4.0.

Viewing 11 reply threads

The support post ‘Members Only Pricing Question’ 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