There are a few ideas in the above code which show what the isue could be:
1. the action ‘save_post_reviews’ is run BEFORE the save_post so ACF is overriding your value. Have you placed any debug code in your function to stop the page loading and look at your DB to see if the code worked?
2. Please use the update_field function instead of update_post_meta. This is ACF friendly.
Basically, you will need to debug the issue to find out if the value is being saved, if the value is being overridden, etc.
Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘update_post_meta not working with acf’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users