Support

Account

Home Forums General Issues Checking post status Reply To: Checking post status

  • When adding a new post, or when updating an existing post, the post_updated hook fires before ACF saves any of the current values in the fields to the database.

    On a new post you are not getting the values because they do not exist yet.

    On an existing post, while you are getting the values you are more than likely getting the old values and not getting the correct value for anything that has been changed.

    In order to ensure that you’re getting the latest values you need to rework you action/filter to use the acf/save_post hook detailed here https://www.advancedcustomfields.com/resources/acf-save_post/ and use a priority of > 10.

    You can continue using your filter, but instead of using get_field() to get any values you will need to use the $_POST[] values being submitted, there is information on using these on the acf/save_post page.