Home Forums Event Espresso Premium Duplicate event with custom field

Duplicate event with custom field

Posted: March 6, 2018 at 3:41 am


March 6, 2018 at 3:41 am


I would like to copy also the custom fields when I duplicate an event. I found this topic in the forum (e.g. and but can’t get it to work.

Here is what I’ve tried:

function duplicate_custom_field($new_event, $orig_event) {
//duplicate custom field
$desc = get_post_meta($orig_event->ID(), 'desc', true);
if ($desc) {
update_post_meta($new_event->ID(), 'desc', $desc);
add_action( 'AHEE__Extend_Events_Admin_Page___duplicate_event__after', 'duplicate_custom_field', 10, 2 );

‘desc’ is a custom field (via acf) which should be duplicated too.


March 6, 2018 at 3:48 am

The code was correct, there was an error on a different spot.

The support post ‘Duplicate event with custom field’ 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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  motio 2 weeks, 3 days ago ago

Topic Tags


This topic is: resolved
Do NOT follow this link or you will be banned from the site!