• Resolved marcdegagnelob

    (@marcdegagnelob)


    Hello,

    I am attempting to hook after each events is saved (created, updated and deleted) of a recurring event series.

    I have tried this one tribe_events_pro_recurring_event_save_after because it made sense. According to the info: Triggers when a recurring event instance is inserted due to the whole series being created or updated.

    It works fine on the initial creation of the series but not completely on update or deletion.

    I find my self stuck because , at that time I am attempting to check some meta_data on each events but it’s not available. I know it’s there because I can see it, it was created when the series was initially inserted. I can get at it any time beside when event are saved.

    This is important because I have to check the meta_data and set conditions form it.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Abz

    (@abzlevelup)

    Hello @marcdegagnelob, thanks for reaching out to us and providing more information here.

    I already shared with the team what you’re trying to accomplish, and I’d get back to you when I hear from them.

    Moreover, could you provide the following versions?
    1. WordPress
    2. The Events Calendar Plugins.
    3. PHP

    Looking forward to helping you with this one.

    Best,
    Abz

    Thread Starter marcdegagnelob

    (@marcdegagnelob)

    Hello ABZ,
    @abzlevelup

    1. WordPress – 6.0
    2. The Events Calendar Plugins
    – Event Calendar – 5.16.1.1
    – Event Calendar Pro – 5.14.2.1
    3. PHP – 7.4

    Thanks!

    Plugin Support Abz

    (@abzlevelup)

    Hi @marcdegagnelob, thanks for providing more information here.

    I reached out to one of our devs saying:

    It’s possible that the reason why the hook isn’t triggering as expected on the update is that the Edit Single link and thus breaking the event out of the series.

    According to the docs → this action will not fire if a recurring event instance is broken out of the series (e.g. using the “Edit Single” link).

    Could you confirm if you’re trying to trigger using the Edit All Link instead of Edit Single?

    Lastly, since you have an active license and for us to help you better, please open a Support Ticket on our Help Desk.

    We look forward to helping you out with this one.

    Best,
    Abz

    Thread Starter marcdegagnelob

    (@marcdegagnelob)

    No this does not apply.
    When initially created a recurrent event is edit all by default I presume.
    When I edit (update) an event is edit all.
    I have not yet tackle this part of editing a single event from a series.

    I found a hidden condition in my code that prevented the hoped logic to append. Now that this is corrected I still find recurring events odd to put the proper logic on it.
    Here is what I found:

    Since I am attempting to hook to any events:
    – For the single event, I hook onto the “save_post” WP hook that work all OK.
    – For the recurrent events, I am using presently the “tribe_events_pro_recurring_event_save_after” hook (after the hidden condition was removed).
    -Works for creation and updates
    – But the first event when created of the series in both cases is not going through the same hook and is captured by the save_post hook only.
    – To hook upon the event deletion I use save_post.

    I don’t know if on your side if this is the expected behavior.

    Late yesterday, I was able to get that par working (almost) by using a condition to filter the first event of the series going through the save_post hook.

    I used : if( $post->post_type == “tribe_events” AND ! $post->post_parent OR ( $post->post_type == “tribe_events” AND $ new_post_status == “trash” )
    Not as clean as would like but it works for the first event of the series and events that are trashed.

    I am still stuck to smaller recurrent events.
    I can’t grab all the events a of larger series unfortunately. I max out at 11 events.

    Any clue to get me further would be appreciated.

    I will look into hiring one of your dev. This is more than I can tackle.

    Thanks,

    Thread Starter marcdegagnelob

    (@marcdegagnelob)

    A ticket was opened.

    Thanks

    Thread Starter marcdegagnelob

    (@marcdegagnelob)

    Come to think of it…

    Would you know if an event that as more than 10 recurring events would use a cron job or a specific hook to save events?

    Thanks

    Plugin Support Abz

    (@abzlevelup)

    Hello @marcdegagnelob, thanks for creating a new ticket on our helpdesk. This seems technical, and my colleague Truman already escalated your concern to a higher Tier.

    We’d appreciate it if you could communicate in the ticket you created #332489 on our helpdesk. This is for us to track down issues and tickets more efficiently.

    Thanks for your patience. One of my colleagues from Tier 3 will be with you in a short while.

    Have a great day.

    Best,
    Abz

    Plugin Support Abz

    (@abzlevelup)

    Hi @marcdegagnelob, I’d be marking this as resolved since you already have an existing ticket on our support helpdesk.

    Please do not hesitate to bump a new ticket on our way for another topic. We’d be glad to help you out.

    Have a great day.

    Best,
    Abz

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Hook on recurring events after each are saved’ is closed to new replies.