Hey, I removed that updating field code immediately after and the problem persisted.
I found a random unrelated chunk of code that was causing the error. I don’t know why it is causing it though. I don’t know if it’s the unrelated code’s fault, or ACF’s fault, or some strange interaction between the two.
Any time I run
wp_update_post() on a page load that occurs within WP Admin, the issue I described shows up. When I deleted all calls to those, everything worked again. I am using them to sync a post type to an external API. Perhaps those two functions require an attachment to a special hook that I’m not using? Any thoughts on that?
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!
© 2022 Advanced Custom Fields.