Support

Home Forums Event Espresso Premium People Admin Add-on: Get prople assigned to Event or Registration

People Admin Add-on: Get prople assigned to Event or Registration

Posted: August 25, 2023 at 8:55 am

Viewing 1 reply thread


pathwise

August 25, 2023 at 8:55 am

So I have the EE_Registration $registration object to start with.

I am guessing with that I can get quite a few different things.
The Event
$registration->event();

The Ticket
$registration->ticket();

But how do I get the people that were assigned to an event from the Event Espresso People Admin plugin?


Tony

  • Support Staff

August 25, 2023 at 4:00 pm

Hi there,

Just to clarify, the people assigned to the event have nothing to do with the EE_Registration object here. I’m assuming you know that but just checking.

So essentially you are just using the EE_Registration object to get the event (or Event ID) and then pulling the people from the event, not the registration.

// Make sure the people helper class is loaded.
EE_Registry::instance()->load_helper('People_View');

// Grab the event ID
$evt_id = $registration->event_id();

// Grab the people from the event
$people = EEH_People_View::get_people_for_event($evt_id);

Is that what you are looking for?

Viewing 1 reply thread

The support post ‘People Admin Add-on: Get prople assigned to Event or Registration’ 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