Custom post meta values are null despite setting default values #63429
Unanswered
pdewouters
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have registered a meta field:
and I am using it in a custom sidebar panel:
The console.log always outputs
{custom_field: null}
even though I set a default value inregister_post_meta
The toggle does work, and sets the value as expected, however the first time I use it, it throws a warning
It seems the default value doesn't get passed to
useEntityProp
?So I have to resort to doing
Am I doing something wrong or is it a bug?
Beta Was this translation helpful? Give feedback.
All reactions