Home › Forums › General Issues › Saved Drafts not displaying custom fields › Reply To: Saved Drafts not displaying custom fields
Sounds good, thanks for the quick response!
I ended up diagnosing the issue by doing a diff of all changes between 5.9.1 and 5.9.2, and slowly reverting changes back to 5.9.1 until I saw the problem disappear. Here’s the gist of just the relevant changes, if needed:
https://gist.github.com/figureone/66fb7004596dc611ae7b3165193461ac
It looks like you were refactoring to better split up changes to options
vs. meta
, by relying on the existence of "update_{$type}_meta
to determine whether to do a meta update or an options update.
If you want to keep that style, you can maybe use if ( get_meta_table( $type ) )
instead, and then follow with a call to update_metadata( $type, ... )
if it’s true, and update_option()
if not. (Similar for the get and delete variants.)
Looks like that’s how core does the check in update_metadata()
:
https://developer.wordpress.org/reference/functions/update_metadata/#source
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.