and it works perfectly for what we want for the primary user.. But now I need to know how to loop through all the additional attendees and withdraw their data from it.
This topic was modified 8 years, 1 month ago by Tony. Reason: link format
We don’t provide support for custom code, however we can help point you in the right direction.
You have the EE_Transaction object which links all of the registrations together so you can use something like kint debugger around the transaction object to find all of the available methods available on the transaction:
d($transaction);
You’ll find the EE_Transaction object has the registrations() method that returns all of the registrations assigned to the transaction. You can then loop over them all and do whatever you prefer.
I have used the $Transaction->registrations(); to get the object but I am still confused on how to access the secondary registrants emails. I am trying to send out a secondary email on top of the one already sent out so I need to be able to get the email addresses from all the registrants and not just the primary one.
I have used the $Transaction->registrations(); to get the object but I am still confused on how to access the secondary registrants emails.
Check what registrations() returns, if you have multiple registrations o a transaction it should return an array of EE_Registration objects so not an object, but multiple objects.
You then loop over those to pull the details you need for each registration.
Viewing 3 reply threads
The support post ‘Getting secondary attendees from registration checkout fields’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.