We have the ability to pull all of the meta values from an event with the event_espresso_get_event_meta function. Is there a way to add a value to an event programmatically if I have the event ID?
I know you can set defaults with custom functions, but I need the ability to set these values on the fly and I couldn’t find any mention of a ” event_espresso_set_event_meta”.
I don’t need an action hook. I was hoping for a quick method that allowed me to update/add an events meta value without having to hit the events detail table, unserialize the event_meta for that event, add my stuff to it and then reserialize and push back into the table.
No, we don’t have such a function built in. But you should be able to add one to your theme’s functions.php file, or to EE’s custom functions file.
Viewing 3 reply threads
The support post ‘Programmatically "set meta"’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.