Posted: June 3, 2013 at 4:19 pm
|
Hello All, I’m looking to do some additional MySQL changes after an event has been published. Is there a way to do this using the templates for EE? I’m on WP: 3.5.1 and EE: 3.1.32.2.P |
Hi there, The templates display event information that’s already in the database, they do not update event details in the database. You’d likely need to build out an add-on that extends the core Event Espresso functionality to accomplish this. |
|
|
Thanks Josh, I have the Custom Files addon, would there be a way for me to use that to build on the method that inserts events into the database? |
|
Looks like the actual insertion occurs on line 377 of insert_event.php under includes/event-management. I don’t see any functions that you can hook into with Custom Files, I basically just need a callback there that I can do some DB manipulation in response to the event being added. Any suggestions on the best way to go about this? |
We really need an action hook there to make this happen. I’ll create a ticket for this, we’re working on adding some hooks to the plugin this week. |
|
|
Awesome, if it’s added this week, at about what time will this deploy to the plugin? |
Event Espresso 3.1.33.P final is shipping today, and this makes 3.1.34.P alpha go into beta. The hooks are in 3.1.34.P and I’d anticipate that we’ll possibly have a .34.P beta in the pre-release channel this week. Here’s what the hooks are: for insert_event.php they’re adding: do_action('action_hook_espresso_insert_event_success',$_REQUEST); and for update_event.php (in case you need to do anything when an event is updated): do_action('action_hook_espresso_update_event_success',$_REQUEST); |
|
Update: The hooks actually got added into dev, there was a mixup in the ticket. So this is something that will be added in .35 which will be in beta in ~ 1 month. If you’d like to get early access I could probably post a few gists of the changes to help you get started on your work. |
|
|
This isn’t a blocking issue for me, but it’d be really great to have these changes in the week before July. Since the update probably won’t hit till July some gists would be great. |
Here is a gist of the new insert_event.php: https://gist.github.com/joshfeck/9d204aac8edc7644c44c Here is a gist of the new update_event.php: https://gist.github.com/joshfeck/b7f53fa21d83762a44b1 These will be tested and are planned on being shipped with Event Espresso 3.1.35.P. |
|
The support post ‘Modifying other database tables upon event creation’ 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.