“Undefined variable: result_tickets” in saving event in PHP
-
Events Manager 5.8 brought at least two changes that have prevented many cases where we would be able to improve and save events programmatically. One is at https://www.ads-software.com/support/topic/adding-category-to-event-in-php/, and then there’s this one that activates in the same cases:
Notice: Undefined variable: result_tickets in wp-content/plugins/events-manager/classes/em-bookings.php on line 315
This occurs when trying to save an event after creating it and adding categories to it, all in PHP. This persists even after temporarily disabling the category part while waiting for the resolution of the other support ticket linked above. This undefined variable seems like a bug that has appeared in EM 5.8 through to the newest 5.8.1.1 because:
1. We have always had bookings disabled.
2. The stringresult_tickets
cannot be found anywhere in our own code. Neithertickets
.Why is an event that doesn’t make any use of bookings or tickets failing to save due to an undefined result_tickets variable in booking code?
- The topic ‘“Undefined variable: result_tickets” in saving event in PHP’ is closed to new replies.