Posted: October 5, 2022 at 12:38 pm
Hi, https://eventespresso.com/topic/print-button-on-ticket-page/ |
|
probably due to php upgrade? |
|
via debugging I get the following
|
|
Hi there,
Which PHP version is your server running? > Fatal error: Uncaught Error: Call to undefined function add_filter() in /home/user/scripts/code.php:14 Your running code calling WP functions ( |
|
This reply has been marked as private. | |
Sorry, I don’t follow. A random PHP debugger would not have access to the WP functions which explains why you are getting that error there, but how does that tie into your site? |
|
This reply has been marked as private. | |
That function I wrote… ‘hooks’ into EE using a ‘hook’: https://www.smashingmagazine.com/2011/10/definitive-guide-wordpress-hooks/ Those are specific to WordPress, so the code has to run ‘within’ WordPress to use those functions. Testing them on a online debugger wont work because it doesn’t know what a hook is, or how it will run. So that explains the above error and for now, let’s put that aside. What is happening on your message template when you use the shortcode for the print button? As in, what do you mean when you say it isn’t working? What happens? |
|
This reply has been marked as private. | |
|
|
That I can work with π So, this is due to a change we made in version 4.10.32.p which adds additional sanitation throughout Event Espresso. I’ve created a ticket for our developers to check into this and see if we can allow that custom function to work again within core. If you are comfortable with PHP and FTP I can give you some details that will force the shortcode to work again for the time being? |
|
Yes, that will be fine! I can give it a try |
|
Go to Line 48, change:
To be:
— Note that generally, I don’t recommend editing plugin files at all but the above should get it working for your event, the above change will be lost the next time Event Espresso is updated on the site. |
|
Thank you so much! The description is clear to me. I will try this when I’m home. |
|
Thanks again. I solved the/my problem! |
|
I –> It (your solution) π |
|
Awesome, I’m glad it worked for you π |
|
The support post ‘Print button is not working’ 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.