Support

Home Forums Event Espresso Premium URGENT: Getting primary registrant email from within custom shortcode Reply To: URGENT: Getting primary registrant email from within custom shortcode

Reply To: URGENT: Getting primary registrant email from within custom shortcode

Author Replies
deon@dieselbrook.co.za # Posted on April 25, 2018 at 9:06 am

So it seems like the system doesn’t find any object except the event object (I used your code from https://gist.github.com/Pebblo/e87cc8e30c4848dcdfe2). The $aee object keep on returning null (as per $aee = $data instanceof EE_Messages_Addressee ? $data : NULL;). At first I thought this was because I was sending a test message directly from the message template and that there would thus be no object to associate. But I also tried doing an actual registration on the site, and it still returned null.

Can I get the attendee details from just the event object, or can perhaps I use the other shortcodes within my custom shortcode?

What I am trying to create (and why I don’t just use the existing shortcode as is) is I’ve built a page that has a quiz relating to the event with an access list (of registrants)(Everything is working fine up until this point). I now want to send the users that registered a link to the quiz page with an encrypted version of their email as a url parameter. I can handle the encryption/decryption, but I just need to get the registrant email for this.

Do NOT follow this link or you will be banned from the site!