Specific order for saving metaboxes data

79 views Asked by At

I am currently working on a Wordpress website using Dynamic Featured Image and Twitter Auto Publish plugins.

Both plugins have metaboxes, and I need to ensure that Dynamic Featured Image saves its metaboxes data before Twitter Auto Publish when I am posting/updating a post. However, I cannot find any information about that. Is it even possible to set up a specific order for saving metaboxes datas? How can I do it?

Thanks in advance for your help!

UPDATE #1

After a little more search, I found out that Dynamic Featured Image metaboxes saving is fired when save_post hook is triggered, while Twitter Auto Publish metaboxes saving is fired when transition_post_status hook is triggered. But seems like transition_post_status is fired before save_post though... Still looking for a proper solution which would not require to rewrite the whole function of one of the plugin.

UPDATE #2

Okay, since I did not find a better solution, I removed the action which was set on transition_post_status of Twitter Auto Publish and added a new action on save_post. For this to work, I copied/pasted and rewrote a little bit the function which was fired on transition_post_status, in order to work for save_post.

1

There are 1 answers

1
Ashish Patel On

This might be help you,

save_post hook is trigger when you save post, so in which you can arrange order of all post data submit from post screen as well.

save post