tribe_update_event

Home Forums Calendar Products Events Calendar PRO tribe_update_event

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1090073
    Keith
    Participant

    I’m trying to do exactly what was mentioned in this post. I want to add a venue to an event without changing the event. Could you post an example here of how to add a venue (or an organiser) to an event, supplying just the minimal number of mandatory parameters?

    The documentation doesn’t seem to have been updated since that post, 2 years ago. I guess it’s still on the radar. Nico mentioned in another thread that he is raising a ticket to update the documentation for tribe_create_event because there are several undocumented parameters.

    Could you post a summary of those in this thread? Just something quick. I really think the basic functions such as tribe_create_event and tribe_update_event should be well documented.

    #1090660
    Nico
    Member

    Hey Keith,

    Glad to help you here once again! You are raising interesting points here…

    This functions args point to the tribe_create_event description so they are outdated as well! The ticket to update this docs is already created and surely be fixed soon 🙂

    In this case the use case is a bit trickier, and in cases like this it’s usually necessary to dig a bit into the code to understand how it works and validates data. In this particular case the venue get’s changed if Venue is defined in the $args array, there also has to be a VenueID inside of Venue. Finally it’s necessary to have any other venue field defined as well. So for example you can do the following:


    $event_id = 161;
    $venue_id = 38;

    $args['Venue']['VenueID'] = $venue_id;
    $args['Venue']['post_title'] = tribe_get_venue( $venue_id );

    tribe_update_event ( $event_id, $args );

    The post_title param is just for the validation to pass.

    Please give the code a try and let me know about it,
    Best,
    Nico

    #1097094
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘tribe_update_event’ is closed to new replies.