Adjusting generated recurring events

Home Forums Calendar Products Events Calendar PRO Adjusting generated recurring events

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1146560
    papertower
    Participant

    Greetings!

    I have a unique situation I’m in where I relate posts to other posts (via Piklist), which works great for single events, but does not at all work with recurring events. The issue is that the relationship meta is generated for the series post, not the subsequently generated posts. So, later, when I try to pull in the related posts, it doesn’t work as the individual events aren’t related — the series is.

    I had the idea of, at the time of editing a series, applying the necessary relate meta to the child events. A complication, however, is that the events are generated asynchronously in a separate request, so at the time of the series edit being processed, there’s a good chance the child events haven’t been generated yet. This made me wonder, is there a hook provided for when an event is being generated?

    Thanks!

    #1146838
    Brook
    Participant

    Howdy papertower,

    I would love to help you find the proper hook. Based on your description I think you could just use the WP action ‘save_post‘. Or more specifically, use the action save_post_tribe_events which will only fire when saving the post type tribe_events. It works the same as save_posts but does not fire as often.

    I just tested it to double check. This fired for every post saved including the followup recurrences:

    function tribe_temp_test( $post_id, $post) {
    
    }
    add_action( 'save_post_tribe_events', 'tribe_temp_test', 2, 2 );

    Did that do the trick?

    Cheers!

    – Brook

    #1155416
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

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