Yes, you cannot do anything with ACF fields from the DB until after ACF saves the values and acf has not done so when the hook you are using runs, so this is returning the old value and not the updated value
in order to do things base on acf fields you need to do one of two things
The first it to use the acf/save_post hook to run your code.
The second is to look in $_POST[‘acf’] to check field values.
See this for more information on both https://www.advancedcustomfields.com/resources/acf-save_post/
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.