Home › Forums › ACF PRO › update_field firing twice? › Reply To: update_field firing twice?
I don’t think that it’s firing twice unless you’re calling it twice.
The reason is that even if update_field() does the update twice this code is only called once, unless you are doing it twice
$count = (int) get_field('views');
// increase
$count++;
So, that means that this portion of code must be running twice.
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.