Getting all instances in recurrence

Home Forums Calendar Products Events Calendar PRO Getting all instances in recurrence

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #321726
    unhinged
    Participant

    I am writing a plugin to extend the functionality of EC Pro. The goal is to prevent two or more events from being booked at the same venue at the same time. For background info, see: https://theeventscalendar.com/support/forums/topic/resource-management-with-pro/

    I have the plugin working great except that it doesn’t account for recurring events yet. I searched the API, the PRO source code, and looked at the DB schema (wp_postmeta._EventRecurrence) and I didn’t see a clear way to get all instances of a recurring event. How can I do this?

    #322896
    Casey D
    Member

    Hello unhinged,

    Barry is gone this week unfortunately and he would be the exact guy to ask.

    After asking around we don’t believe we have a built in function in the API that will do what you ask.

    You may want to just try tribe_get_events with the title query set to the event you want. I believe all recurring instances have the same title, so they should all be returned.

    If that doesn’t work let me know! I’ll follow up and see if we can get something elegant thought up.

    Cheers!

    – Casey Driscoll

    #334865
    unhinged
    Participant

    Thanks for the response and tip. Searching by title has its obvious drawbacks but if that is the best I can work with, I think it could work. Could you flag this thread for Barry when he gets back? I would love to hear if he can come up with anything else.

    #336527
    Casey D
    Member

    Hello unhinged,

    Yep! I’ll assign a question to him so he can take a look when he returns.

    Cheers!

    – Casey Driscoll

    #640313
    Casey D
    Member

    Hello unhinged,

    We typically close threads if there is no activity after two weeks. Feel free to create a new thread and reference this one to save you time.

    Cheers!

    – Casey Driscoll

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Getting all instances in recurrence’ is closed to new replies.