Hi @iacopoincerpi,
Thank you for sharing the screenshot, I can’t replicate this issue on my end with the PHP code you shared. Have you changed the server PHP version recently by any chance?
Is the end of the snippet correctly formatted to close the opening {?
Do you have other PHP snippets active that might be interfering here somehow?
Thread Starter
Iacopo
(@iacopoincerpi)
Already tried to close, same result. In other website the same code work (same version of php and same codesnippet version)
Hi @iacopoincerpi,
That’s not going to work and I’m not sure how it worked before but you need to close the add_action and the function, basically you need to add the line highlighted in the screenshot at the end: https://a.supportally.com/i/HXOQGI
Thread Starter
Iacopo
(@iacopoincerpi)
Now working on that site.
But in other site still work activated like this…
@iacopoincerpi – I’m not sure how that works but I’d recommend updating the code for both versions. Alternatively, you can simply remove all the PHP part and use an HTML snippet with the auto-insert location set to Site Wide Header and it will work the same but with no risk of a PHP error from the snippet.
Thread Starter
Iacopo
(@iacopoincerpi)
Thanks for the help, appreciated
