Home › Forums › Backend Issues (wp-admin) › Why doesn't this work on acf/save_post when attaching gallery ids? › Reply To: Why doesn't this work on acf/save_post when attaching gallery ids?
Does the field with the key field_63a6bd5d2a3d2 actually exist on the page/post that is being submitted?
Assuming this is the case.
Your save_post action has a priority of 1. ACF runs on the save_post hook with a priority of 10. Your action is running before ACF saves field values. When ACF saves the field values it updates the same field with whatever was submitted in the form, overwriting what you did.
This is why it is important to use the acf/save_post hook instead of the standard save_post hook with the correct priority to run either before or after ACF has saved 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 use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.