As you can see in the code, the “transition_post_status” hook provides three arguments for the send_checklist_publish() function while the “acf/save_post” hook provides only one argument, which is the post ID. This page should give you more idea about it: http://www.advancedcustomfields.com/resources/acfsave_post/.
In the send_checklist_publish() function, it checks the
$new_status variable, which is set to post ID by the “acf/save_post” hook. Thus, it will return an empty response because the post ID is not the same as “publish”.
I believe using the “transition_post_status” is a better way to do it.
I hope this makes sense.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.