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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.