From a74c262a96fc9984b68bb84a5ac2e01618f54296 Mon Sep 17 00:00:00 2001 From: AlexV Date: Fri, 29 Nov 2024 18:10:57 +0700 Subject: [PATCH] fix: 404 error for logging --- src/Transport/HttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Transport/HttpClient.php b/src/Transport/HttpClient.php index f254c3c..0aa4b1f 100644 --- a/src/Transport/HttpClient.php +++ b/src/Transport/HttpClient.php @@ -47,7 +47,7 @@ public static function sendJsonRequest( $result = self::processRequest($url, $method, $config); - if (($log = wc_get_logger()) && !$result->isSuccess()) { + if (($log = wc_get_logger()) && !$result->isSuccess() && $result->getStatusCode() !== 404) { $log->debug('API returned error', [ 'code' => $result->getStatusCode(), 'resp' => $result->body(),