Returning ACF custom field from publish_post
Your action is triggered in wp_transition_post_status() which gets called by wp_insert_post() before the action save_post is triggered. save_post is the typical action to handle custom fields. ACF also works on this. Basically you have to wait until ACF is done with its stuff, means you’ll have to hook to save_post with a priority > 10 … Read more