Support

Home Forums Event Espresso Premium How to get registration ID from registration object

How to get registration ID from registration object

Posted: January 7, 2016 at 11:15 pm

Viewing 1 reply thread


Regenesys

January 7, 2016 at 11:15 pm

Hi,

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?

Thanks.


Tony

  • Support Staff

January 8, 2016 at 3:55 am

Hi there,

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.

Event Espresso