WordPress: Saving metadata inside of a class
I am making a php class to make and manage custom metaboxes. Somehow it won’t save the values from the field, it doesn’t even save a value if I hardcode the update_post_meta
function eg update_post_meta(25, 'test_key', 'foo')
. I’m guessing there is something wrong with my add_action
but it fires, I think, because when I add a var_dump()
or echo
in the save function it says “Updating failed. The response is not a valid JSON response”