Updating an event after using tribe_get_events

Home Forums Welcome! Pre-Sales Questions Updating an event after using tribe_get_events

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1096889
    Andre Boyle
    Guest

    I’m planning on creating a .PHP script to use with EventsCalendarPro which will run as a scheduled task.

    The purpose of the script is to read all events in the database which have additional fields that will store dates. Each time the script is run it will read each event whose start date is in the past, look at the additional fields and identify is one contains the next available date. It will then update the events start date to reflect the additional field which has been found.

    The upshot of this script is that it will allow us to define multiple dates in a sequence and have the event automatically move to the next date in the sequence.

    I cannot find a function provided by Tribe to update an event, only query event data. Is there perhaps a Tribe_Set_StartDate event or similar?

    Thanks.

    #1096931
    George
    Participant

    Hey Andre—thanks for reaching out!

    I want to be frank right off the bat that, even for our paid, premium license holders, we cannot help with custom coding projects. → https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/

    So our ability to help out here in the free, open Pre-Sales Questions forums is especially minimal.

    While I wanted to make sure your expectations were set fairly, I’m still happy to help here—and the good news is that we actually do have a function for “updating” event data.

    That method is actually part of a whole API class we have, which sounds like it’d be super handy for your needs.

    To explore this API class, head to this file in your The Events Calendar plugin files:

    the-events-calendar/src/Tribe/API.php

    In this file you’ll find methods like updateEvent(), which seem to be exactly the sort of thing you’re looking for:

    Explore that file, tinker around a bit, and see if this stuff helps. I hope it does!

    Best of luck with your project,
    George

    #1103449
    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 ‘Updating an event after using tribe_get_events’ is closed to new replies.