Support

Home Forums Event Espresso Premium [EE3] Add Attendee With Custom Code/PHP

[EE3] Add Attendee With Custom Code/PHP

Posted: October 26, 2015 at 4:37 pm


B D

October 26, 2015 at 4:37 pm

Hi,

Is there a PHP function I can use to add an EXISTING user to an EXISTING event?

I’ve figured out that you can insert the user/attendee into the MySQL wp_events_member_rel table but first I would need to create a record in wp_events_attendee which has registration_id and attendee_session which I’m not sure how to generate. I’m also not sure if I MUST create a record in wp_events_attendee_meta (or any other table).

Basically, I have a list of existing users and I want to update some of their user_meta data and link them to specific events (which I manually created and have the event ID for).

Your help on this would be much appreciated.

Thank you.


Josh

  • Support Staff

October 26, 2015 at 7:21 pm

Hi B D,

It turns out there is an add-on that will let you import a list of attendees into the wp_events_attendee from a CSV file. You should be able to use this tool to link your existing users to specific events.

https://eventespresso.com/wiki/attendee-batch-import-add-on/


B D

October 27, 2015 at 8:00 am

Unfortunately it doesn’t look like that actually links WP Users with events. But it does have some source code I can use to figure it out!

Thank you!


Josh

  • Support Staff

October 27, 2015 at 9:20 am

You’re welcome. Yes it will not automatically link WP Users with events, but it will programmatically add the registrations to the wp_events_attendee table.

The support post ‘[EE3] Add Attendee With Custom Code/PHP’ 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