Support

Home Forums Event Espresso Premium Post duplicate event hook

Post duplicate event hook

Posted: February 5, 2020 at 7:56 am

Viewing 2 reply threads


Daniel

February 5, 2020 at 7:56 am

Hi!

I am circling back to this support topic:
https://eventespresso.com/topic/private-event-loses-private-status-after-duplication/

I have determined that the event loses its “People” and all Custom Field data.

The support topic linked above indicates that I can set up a hook to handle post duplication. I’ve done that before, but for simpler things, and I am wondering if there is any example code for this particular hook that could get me started.

Can you point me to a gist (if one exists)?

TY!


Josh

  • Support Staff

February 5, 2020 at 12:07 pm

Hi,

I can point you to an example of how EE4 core uses the hook:

https://github.com/eventespresso/event-espresso-core/blob/master/caffeinated/admin/extend/messages/espresso_events_Messages_Hooks_Extend.class.php#L278

https://github.com/eventespresso/event-espresso-core/blob/master/caffeinated/admin/extend/messages/espresso_events_Messages_Hooks_Extend.class.php#L37

and another example from the MailChimp add-on:

https://github.com/eventespresso/eea-mailchimp/blob/a86bffd4a16457addbcf2c7ea3f3223c1adb3752/EED_Mailchimp.module.php#L244

https://github.com/eventespresso/eea-mailchimp/blob/master/EED_Mailchimp.module.php#L50


Daniel

February 5, 2020 at 12:10 pm

This is great! Thank you for the references.

Viewing 2 reply threads

The support post ‘Post duplicate event hook’ 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