Home › Forums › Bug Reports › acf/save_post – wrong taxonomy field value › Reply To: acf/save_post – wrong taxonomy field value
I think you get me wrong. I’m not saying that the taxonomy term is not saved. The values are saved properly (for the custom field and for the taxonomy term as well). This is not the issue.
I’m saying that the value of the taxonomy custom field is wrong when I try to get its value in the acf/save_post
callback. When the value of the priority parameter is set to 20 then in the acf/save_post
I should receive the newly set CF value, but instead of a new value, I get the previous one.
add_action('acf/save_post', function ($postId) {
get_field('image-field', $postId); // Returns the correct value
get_field('taxonomy-field', $postId); // Returns the same value as if the priority parameter was set to 10
}, 20 ); // Notice the priority parameter
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.