diff --git a/src/WpHandler.php b/src/WpHandler.php index 727193f..9d19522 100644 --- a/src/WpHandler.php +++ b/src/WpHandler.php @@ -7,6 +7,7 @@ use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use RebelCode\Psr7\Response; +use WP_Error; use function wp_remote_request; @@ -60,6 +61,7 @@ public function handle(RequestInterface $request): ResponseInterface $args = $this->prepareArgs($request); $httpVer = $request->getProtocolVersion(); + /** @var WP_Error|array $responseData */ $responseData = wp_remote_request($uri, $args); $code = wp_remote_retrieve_response_code($responseData);