We seem to be hitting this issue on our site where we just enabled W3TC last week. In our case we are using a
save_post hook on a custom post type and have it set to run at the default priority of
10. After turning on W3TC the values of our
get_field calls in the
save_post running in the admin are all returning blank. Oddly we tried totally disabling the W3TC plugin and purging all it’s cache, but the issue persists. Using the ‘Debug Objects’ plug-in we still see the W3TC cache objects even with the plug-in disabled and with repeatedly purging the cache. We also tried leaving the W3TC plugin active and disabling and punching it’s object cache and that did not help.
We have also tried adjusting the priority on the
save_post call to
999 and that did not help. Oddly moving the priority to earlier,
9, did fix the
get_field issue, but then when we tried later to call
update_field that failed to save the data to the
At this point we are at a bit of a loss on how to proceed with troubleshooting and debugging this issue. Any thoughts or help would be appreciated.
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!
© 2023 Advanced Custom Fields.