• I am trying to add some functionality and save some custom meta fields I have added to the TEC post type. I have add the following to my plugin code:
    add_action( 'save_post', 'swsctp_save_tribe_data'); //Save Tribe Events Additional Meta-Data

    The function executes, however, it does not execute in the order that I need. Some of the functions called within the swsctp_save_tribe_data() method needs the standard TEC meta data to already be saved.

    To try to change the order in which the actions are executed, I added the priority to the actions:

    add_action( 'save_post', 'swsctp_save_tribe_data', 16); //Save Tribe Events Additional Meta-Data

    I looked to see what actions were registered, and the highest priority that TEC uses on the save_post appears to be 15. When I set the priority to 16, the function never executes. If I set the priority lower than 15, it executes, but still can pull the TEC meta data.

    Is there another action that I can hook to that is built into TEC for saving post information that would execute following the meta data save?

    Thanks in advance.

    https://www.ads-software.com/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    I wish I was able to provide more support but this type of customization extends beyond the scope we’re able to provide. Good luck with the meta customizations and thanks for choosing TEC ??

    Hi,

    Have you tried hooking into “tribe_events_update_meta”

    That hook fires after the TEC meta is saved and might do what you need.

    Thanks for jumping in Sean! Indeed what you seuggest seem to be the way to go…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add_action('save_post') priorities’ is closed to new replies.