I have a list of custom post types (Events) with ACF fields for start and end dates that I'm getting using WP-API. I'm using the fetch api to make the calls. I have the acf-to-rest-api plugin installed and activated. I'm using the lastest versions of everything.

I changed the start and end date fields of an event after it had been created. The new values are displayed in the post editor, and when I dig into the actual database it's got the correct updated values. But the WP-API call is return the old value. What could be going on?

I've tried clearing all caches I could think of, messed around with transients... anything else?

  • Versions: WP v4.9.7, ACF (Pro) v5.6.10, ACF to REST API v3.1.0, Custom Post Type UI v1.5.8, PHP v7.2.1, MySQL v5.6.38, Chrome v67.0.3396.99 – willfalcon Jul 17 '18 at 1:39
  • Sure it's not just the browser cache? What do you see if you open the request URL in an incognito window, or a different browser? – Jacob Peattie Jul 17 '18 at 7:08
  • @JacobPeattie yep, different browsers, postman, all returning the same old value. The problem was actually caught by the client after they changed the event date, and instead of changing dates it just disappeared. – willfalcon Jul 17 '18 at 14:56

I found the problem and I'm embarrassed... I had hardcoded one of the request urls in my js, but used the url to the staging site. So the value wasn't updated because the value in the staging site hadn't changed. #facepalm#

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.