• 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 string result_tickets cannot be found anywhere in our own code. Neither tickets.

    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?

Viewing 16 replies (of 16 total)
  • If you don’t need the location info, it would probably simplify things to remove the locations from events before exporting / importing the data.

    The standard WordPress import / export tools can handle transferring locations, events and recurring events.

Viewing 16 replies (of 16 total)
  • The topic ‘“Undefined variable: result_tickets” in saving event in PHP’ is closed to new replies.