Posted: October 18, 2024 at 12:09 am
Hi, |
|
Hi there, May I ask what the code is doing here? There may be a better hook to use depending on what you are doing.
Run the code once but on registration OR updating attendee info? So the code wouldn’t run just once in this case?
The hook you are using only runs on the thank you page already. But, it sounds like you only want it to run on the initial registration, but then also on update? |
|
This reply has been marked as private. | |
So, is this based on a payment rather than the thank you page? If so I’d looked into using:
Which runs on a successful payment within a transaction and is passed the EE_Transaction and EE_Payment object. That doesn’t run within the thank you page so it doesn’t matter how many times that loads/registrations are edited. |
|
This reply has been marked as private. | |
The hook is passed the This is the hook call:
Currently, you’re hooking in using the default priority and argument count:
So your function is only passed the first argument, which is the transaction, that’s fine and you have:
This means your function has the EE_Transaction passed to the hook within But then you immediately replace that with:
If you are passed the transaction you don’t need to get the transaction from the reg_url_link in the URL. The code after that point to pull in the registrations and attendees from each registration looks valid although I don’t have enough context to know if it will do what you need.
Yes, but I’m confused here, did you not have this within your original custom function? |
|
You must be logged in to reply to this support post. Sign In or Register for an Account