Error thrown

Call to undefined function wp_is_serving_rest_request()