Support

Home Forums Event Espresso Premium Group Registration Errors If Members of the Group Are Already WP-Users

Group Registration Errors If Members of the Group Are Already WP-Users

Posted: May 17, 2018 at 6:47 pm

Viewing 4 reply threads


afermtools

May 17, 2018 at 6:47 pm

Hello,

We’re taking group registrations for events where some members of the group are already in the WP-User table (We’re also running Paid Memberships Pro, and so members of the group also often hold membership levels on the site.)

The nature of the events are such that department heads of government agencies will often order tickets for attendees in their departments, often doing it that way to comply with various protocols.

The problem is that when one goes to order for a group and members of the group are already users on the site, EE4 throws a validation error and prevents the purchase. We ARE able to handle these group situations on the site backend, which suggests that there’s some validation code that executes when the transaction is run on the front end, and that doesn’t run on the back end.

Perhaps the easiest solution for us would be if you could provide a snippet that turns off the validation code and lets the transaction process on the front end?

Perhaps changing the settings in Registration Form >> User Integration might fix this problem? Would that make a difference, and would it make a difference regarding already existing WP-Users when group tickets are purchased for them?

Please let us know… We’re beginning registration for the biggest event of the year, and will have to handle entries manually/by phone if we’re not able to resolve this issue.

Thanks again for your help.


Tony

  • Support Staff

May 18, 2018 at 3:02 am

Hi there,

Perhaps the easiest solution for us would be if you could provide a snippet that turns off the validation code and lets the transaction process on the front end?

We call that the traffic cop: https://eventespresso.com/product/eea-wp-user-integration/#traffic-cop

To disable that email check you can use this snippet:

https://gist.github.com/joshfeck/1131145859a3fab58f4d#file-disable_email_match_everyone-php

Note that it’s the code in the second file, not the first. The second file disables the email check for all users, the first disables the check for logged out users.

Add that code to a custom functions plugin o you site, we have documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Perhaps changing the settings in Registration Form >> User Integration might fix this problem? Would that make a difference, and would it make a difference regarding already existing WP-Users when group tickets are purchased for them?

There’s no setting for this currently, the only way to disable that check is the above code.

With the above code in place you should just be able to add multiple registrations details to the registration form regardless if they are member or not. Note however that the additional registrations made using details that do not match the ‘primary registrant’ will not show up in the ‘My Events’ section of the add-on.


afermtools

May 18, 2018 at 4:00 pm

Thanks Tony. Looking into all of this now.


afermtools

May 18, 2018 at 6:44 pm

Just clarifying:

What we’re looking for is to not validate the email for any of the the tickets being purchased when the purchasor is already logged on. (Much like what happens through the back end registration).

We do want to keep validation for someone not loggged on to the site.

That is what the FIRST code snippet does, am I understanding that correctly?

Thanks!


Tony

  • Support Staff

May 21, 2018 at 3:18 am

The first snippet actually does the exact opposite of that, but it’s easy to change it.

This:

if ( ! is_user_logged_in() ) {
    return false;        
} else {
    return true;
}

Is ‘if the user is not logged in, return false, otherwise return true’

The email check is done if true is returned, so change it to:

if ( is_user_logged_in() ) {
    return false;        
} else {
    return true;
}

‘If the user is logged in, return false, otherwise return true’.

Viewing 4 reply threads

The support post ‘Group Registration Errors If Members of the Group Are Already WP-Users’ 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