Support

Home Forums Event Espresso Premium Duplicate event registration issue

Duplicate event registration issue

Posted: April 2, 2021 at 9:58 am

Viewing 3 reply threads


twcassidy14

April 2, 2021 at 9:58 am

Hello,

I am having trouble with event espresso duplicate registration we used to have this code added to prevent that (see link below), this used to work in the past but it does not seem to be working anymore, did anything changes?

https://gist.github.com/Pebblo/10669adfeea322ade3d96a38857fb46b

Thanks for your help


twcassidy14

April 2, 2021 at 11:00 am

Hello again,

After a bit of degugging it looks like when this is excuted
$att_id = get_user_option('EE_Attendee_ID', $user->ID);

$att_id is returning an id

but when this line is excecuted
$contact = EEM_Attendee::instance()->get_one_by_ID( $att_id );

$contact is empty, it should return the instance of EE_Attendee

The current user is already registered for this event so it should return it.

Thanks for your help!


Tony

  • Support Staff

April 5, 2021 at 2:16 pm

Hi there,

No, nothing has changed with how EE_Contacts work within Event Espresso.

So your getting an ID from Line 16 but then when EE is trying to pull an EE_Contact for that ID it can’t find one.

If you know the $att_id returned for a user that is running into this issue then first check within the EE admin if a Contact exists for that ID.

Say the $att_id you have is 999, go to:

Event Espresso -> Registrations -> Contact List

Don’t search for the ID, it won’t help, but click to edit any of the contacts listed there, the first one is fine.

In the address ar you’ll see something like:

?page=espresso_registrations&action=edit_attendee&post=372

Change the &post=372 to match the $att_id from earlier and hit enter.

What do you see?


twcassidy14

April 8, 2021 at 3:35 pm

This reply has been marked as private.
Viewing 3 reply threads

The support post ‘Duplicate event registration issue’ 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