Home › Forums › Backend Issues (wp-admin) › Update field not replacing it's content if post date is changed › Reply To: Update field not replacing it's content if post date is changed
Try setting your priority higher
add_filter('acf/update_value/name=event_end_date', 'my_acf_update_value', 20, 3);
Also, I’m not sure what format the value needs to be in. A date field does not store a Unix time stamp, so this might be incorrect. get_the_time ('U', $post->ID) + 3628800
You need to figure out the format of the value that ACF is passing your filter and then return the correctly formatted value.
I would do this by temporarily adding
echo $value;die;
at the beginning of the function to figure out what I need to do.
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.