Posted: April 12, 2023 at 6:23 pm
Hello, I just updated to 5.0.3.p and I am getting an error on a custom function on my function.php file. The issue is with this line below: $registration = $contact->get_most_recent_registration_for_event($post->ID); The error is this: Call stack: EE_Attendee::get_most_recent_registration_for_event() I am assuming that this function has changed on the most recent version, but I am not sure how to modify it with the proper parameters for it to work as previously. Thank you for your help. |
|
Hi there, I’ve created a ticket for our developers to investigate this. In the meantime you can change:
Line 575 should be something like:
Change it to be:
The ? before the return type allows for it to be null. Generally, we don’t recommend editing core files at all. However, we will likely include a fix for this in the next update so on this occasion it should be fine. |
|
Hi Tony, Thank you for the prompt response; I went ahead and changed the core code even if it is not recommended. Hopefully, this will be patched in the next update. Thanks for helping with this! |
|
Hi Tony, Thank you for the prompt response; I went ahead and changed the core code even if it is not recommended. Hopefully, this will be patched in the next update. Thanks for helping with this! |
|
You’re most welcome 🙂 |
|
The support post ‘Error with get_most_recent_registration_for_event after update.’ 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.