Home › Forums › General Issues › update_field not working unless die() in function › Reply To: update_field not working unless die() in function
I would rather use the acf/save_post action (and not transition_post_status) as described here: http://www.advancedcustomfields.com/resources/acfsave_post/
This should solve your issue. If the die() is acting like this, it is because there is normally others actions taking place after the transition_post_status action, so when you script dies, you are only cancelling what is following (and what is following is putting back your data to the original posted values).
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!
We’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.