Support

Home Forums Event Espresso Premium Modifying other database tables upon event creation

Modifying other database tables upon event creation

Posted: June 3, 2013 at 4:19 pm

Viewing 9 reply threads


Enertech APACT

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


Josh

  • Support Staff

June 4, 2013 at 9:09 am

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.


Enertech APACT

June 4, 2013 at 1:09 pm

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?


Enertech APACT

June 4, 2013 at 1:39 pm

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?


Josh

  • Support Staff

June 4, 2013 at 4:56 pm

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.


Enertech APACT

June 5, 2013 at 8:35 am

Awesome, if it’s added this week, at about what time will this deploy to the plugin?


Josh

  • Support Staff

June 5, 2013 at 9:51 am

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); 


Josh

  • Support Staff

June 5, 2013 at 9:59 am

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.


Enertech APACT

June 5, 2013 at 3:27 pm

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.


Josh

  • Support Staff

June 10, 2013 at 8:29 am

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.

Viewing 9 reply threads

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.

Event Espresso