Hello EventPro-ers
I currently have version 2.0.1 installed of EventPro.
I can update to version 3.01
I a customer short_code which I wrote. My question is if I upgrade to newest version will my custom code be zapped? Is there anyway to preserve custom code so that when I do updates I don;t have to replace this code manually??
Thank you
Martin Suchta
Hi Martin,
This depends where you put the code. If it was inside the event-organiser-pro
folder then yes. Otherwise, no.
When writing custom code a lot of developers will put it in the child’s theme functions.php
(which allows them to update the theme). If its not specific to that theme I would strongly recommend creating your own plug-in to put the custom code in: https://wp-event-organiser.com/blog/tutorial/where-should-i-put-code-from-the-tutorials/
I’d also strongly recommend you review the changelog and this blog post: https://wp-event-organiser.com/blog/announcements/event-organiser-pro-v3/ in case there are hooks or functions you are using which have changed or been removed.
Stephen Harris
Hi Martin,
This depends where you put the code. If it was inside the event-organiser-pro
folder then yes. Otherwise, no.
When writing custom code a lot of developers will put it in the child’s theme functions.php
(which allows them to update the theme). If its not specific to that theme I would strongly recommend creating your own plug-in to put the custom code in: https://wp-event-organiser.com/blog/tutorial/where-should-i-put-code-from-the-tutorials/
I’d also strongly recommend you review the changelog and this blog post: https://wp-event-organiser.com/blog/announcements/event-organiser-pro-v3/ in case there are hooks or functions you are using which have changed or been removed.
Stephen Harris