Good morning Freddy and welcome back!
Thank you for reaching out to us.
We are sorry to hear about the snippet crashing your site! This was certainly not intended on our part.
I would love to help you with this topic.
As a first troubleshooting step, could you please provide us with your complete system information in a private reply using the instructions found in the following link?
https://theeventscalendar.com/knowledgebase/sharing-sys-info/
Secondly, would you mind sharing your modified functions.php file (including that snippet) in a .zip file ?
Best regards,
Geoff B.