Home › Forums › General Issues › Manipulate custom fields (created in acf) in a function with save_post action (o › Reply To: Manipulate custom fields (created in acf) in a function with save_post action (o
ACF does not fire on this hook save_post_product
, it saves only on the save_post
hook which happens after the post type specific hook you are using. This means that ACF has not saved any fields before you are trying to get the values of the field.
Your choices here are
1) use the acf/save_post hook https://www.advancedcustomfields.com/resources/acf-save_post/ priority > 10
2) access the submitted values directly in the $_POST[‘acf’] varialble, information on this is also given in the doc link above.
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.