I installed JSON API plugin and it worked properly ,but its an old version
then I installed WordPress REST API (Version 2) and it didnt make any result and just show this for my request:
"Unexpected '<' "
I installed JSON API plugin and it worked properly ,but its an old version
then I installed WordPress REST API (Version 2) and it didnt make any result and just show this for my request:
"Unexpected '<' "
in wp-includes/meta.php file
we should add this code :
function get_registered_meta_keys( $object_type ) {
global $wp_meta_keys;
if ( ! is_array( $wp_meta_keys ) || ! isset( $wp_meta_keys[ $object_type ] ) ) {
return array();
}
return $wp_meta_keys[ $object_type ];
}