Help Desk

Accessing event tickets additional fields in PHP

  • | Permalink

    I am writing a plugin which takes events created in Events Calendar and writes them to another website. It is 95% finished, mostly using tribe supplied functions (e.g. tribe_get_events). The only piece I am missing is the (re)creation of event ticket additional fields. I can access these via $ticket_fields = get_metadata(‘post’, $ticket_id, ‘_tribe_tickets_meta’, $single=false); and theoretically could update these via update_post_meta($ticket_id, ‘_tribe_tickets_meta’, $ticket_fields). However I need to add the value returned from the remote site to the meta so that I do not upload it again or can add information to the right ticket on the remote site should it have to change. What would be the safest (update proof?) or recommended way to create and access this value in the ticket field meta?

    Posts: 1620
    | Permalink

    Hi Alan,

    Thanks for reaching out! It looks like this post may be an unintended duplicate of your previous one, so I’m going to go ahead and close this thread out, if that’s alright with you! Please don’t hesitate to follow up with a new thread if you should have any other questions or if there’s anything else that we can do for you! 🙂