Wrong event references in event-organiser-ajax.php

WordPress Event Management, Calendars & Registration Forums Report A Bug Wrong event references in event-organiser-ajax.php

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 6 years, 12 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27194

    Hi Stephen,

    In the event-organiser-ajax file you are (very consistently!) using the $post->occurrence_id, claiming it represents the event occurrence. In fact, it is a synonyme of $post->event_id; you should probably use $post->event_occurrence instead.

    This caused me a lot of problems when I was trying to finally write the calendar tooltip filter: I was trying to include some ticket meta there, and I was constantly getting nothing because eo_get_booking_meta() was picking up non-existing event occurrences…

    Please have a look if my diagnosis is correct.

    Best regards — Jarek

    Jaroslaw
    #27195

    Hi Jaroslaw, the event_id column in the database is poorly named: it references the occurrence ID and not the post ID of the event. For this reason the occurrence_id alias exists to clarify intent.

    event_occurrence is an obsolete column which is to reference the ordinal number of the occurrence. This is no longer in use.

    I’m not sure what the context is but eo_booking_meta() retrieves information about a particular booking (and not ticket). The ID passed should be the ID of the booking.

    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.