-1

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 '<' "

Hippo
  • 43
  • 1
  • 2
  • 11

1 Answers1

0

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 ];
} 
Hippo
  • 43
  • 1
  • 2
  • 11