Retrieve event with ORM after creating it?
-
Hello,
I am currently using the save_post_tribe_events hook when creating an event in the wordpress page to retrieve it and do something with it. I want to retrieve that event with the ORM like this:
add_action('save_post_tribe_events', 'get_event'); function get_event($event_id) { $new_event = tribe_events()->by('id', $event_id)->first(); }
The problem is that returns null and I think that is because the event hasn’t been stored yet on the db when that hook fires. I could use the tribe_get_event() function, but that doesn’t give me all the info the ORM gives me, like the venue object or the organizer object
What can I do?
Thank you for your time
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Retrieve event with ORM after creating it?’ is closed to new replies.