From 26d159f0b23d2d99d1421a15f20d923e7fb8f8fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lucas=20Garc=C3=ADa?= <lucas@codeccoop.org>
Date: Sun, 7 Jul 2024 23:25:30 +0200
Subject: [PATCH] fix: do_request error handling status code checker

---
 includes/class-http-client.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/class-http-client.php b/includes/class-http-client.php
index ed56cf6..23a9275 100644
--- a/includes/class-http-client.php
+++ b/includes/class-http-client.php
@@ -134,7 +134,7 @@ class Http_Client
             return (array) json_decode($response->body, true);
         };
 
-        if ($response->response['status'] !== 200) {
+        if ($response->response['code'] !== 200) {
             return new WP_Error(
                 'wpct_http_error',
                 __("Http error response status code: Request to {$url} with {$args['method']} method", 'wpct-http-bridge'),
-- 
GitLab