Home › Forums › Bug Reports › acf/update_value filters working improperly › Reply To: acf/update_value filters working improperly
the code
$value = apply_filters( "acf/update_value", $value, $post_id, $field, $value );
is called before any filters are applied. At this point the original value will always be the same as the current value.
Filters can only modify the $valueand cannot alter the
$orig_value` (argument #4). Every filter may get a different value but they will always get the same original value.
Testing this with multiple filters set at different priories and displaying both the current value and the original value in each one I get a constantly changing $value
while $orig_value
(argument #4 to my filters) remains unchanged.
I don’t understand how is this working in a way that’s unexpected?
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.