I’m using the hook AHEE__EE_Registration_Processor__trigger_registration_update_notifications and the returned registration object is protected. I’ve looked at the class EE_Registration but can’t find a function to retrieve the registration id, which I need to make a call to the API to fetch answers associated with the registration. Any ideas?
You can use the ID() method on the registration object. So
$registration_id = $registration->ID();
If you are not already using Kint I would highly recommend doing so, you can use a plugin such as Kint Debugger then wrap object, variables etc within d();, foe example:
d($registration);
Give you a much nicer output showing all available properties and methods that are available on that object.
Viewing 1 reply thread
The support post ‘How to get registration ID from registration object’ 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.