public function get_item($request) { if ($this->show($request)) { return parent::get_item($request); } return new WP_Error('rest_no_route', __('No route was found matching the URL and request method', 'acf-to-rest-api'), array('status' => 404)); }