• Resolved robertcc18

    (@robertcc18)


    I am trying to update the venue of an event using the tribe update event function. But when I try to run the function it causes a timeout error on my site.

    Here is my code

    add_action( 'edit_post', 'update_venue_hack' );
            function update_venue_hack($post_id) {
                    $venue_title = get_post_meta($post_id, '_EventVenueIdTitle', true);
                    $new_venue_get = get_page_by_title($venue_title, OBJECT, 'tribe_venue');
                    $new_venue_id = $new_venue_get->ID;
                    $event_args = array(
    
                            'Venue' => $venue_title,
                    );
                 tribe_update_event($post_id, $event_args);
            }

    What am I messing up here?

The topic ‘tribe_update_event not working’ is closed to new replies.