Home Forums Bug Reports acf/update_value filters working improperly Reply To: acf/update_value filters working improperly

  • That would depend on the priority of your filter. When a field is updated, not only is your filter used but ACF uses the same hook to update the value. If the priority of your function is < 10 then both values will be the same. If your priority is the default of 10, well, it’s hard to say as there’s no way of knowing if your filter will run first or the acf filter will run first. When using ACF filters like this is is always best to use a priority > 10, this ensures that ACF has done all of it’s internal filtering before your filter is called.

    This 4th parameter is not documented, and ACF does not use it. I suspect that this value will eventually be used to test if the field value has been altered and if it has that ACF will not override the new value, but that’s just a guess.