diff --git a/src/include/api/class-wc-retailcrm-proxy.php b/src/include/api/class-wc-retailcrm-proxy.php index 4f9f9c8..f2bd53e 100644 --- a/src/include/api/class-wc-retailcrm-proxy.php +++ b/src/include/api/class-wc-retailcrm-proxy.php @@ -121,7 +121,7 @@ if (!class_exists('WC_Retailcrm_Proxy')) : $response->getStatusCode(), $response->getErrorString() ), - ['response' => $response->getRawResponse()], + ['response' => json_decode($response->getRawResponse(), true)], WC_Retailcrm_Logger::TYPE['res'] ); } diff --git a/src/include/class-wc-retailcrm-loyalty.php b/src/include/class-wc-retailcrm-loyalty.php index 32ae458..f53754e 100644 --- a/src/include/class-wc-retailcrm-loyalty.php +++ b/src/include/class-wc-retailcrm-loyalty.php @@ -95,7 +95,8 @@ if (!class_exists('WC_Retailcrm_Loyalty')) : if (!$response->isSuccessful()) { WC_Retailcrm_Logger::error( __METHOD__, - 'Error while registering in the loyalty program: ' . $response->getRawResponse() + 'Error while registering in the loyalty program', + ['response' => json_decode($response->getRawResponse(), true)] ); } @@ -125,7 +126,8 @@ if (!class_exists('WC_Retailcrm_Loyalty')) : if (!$response->isSuccessful()) { WC_Retailcrm_Logger::error( __METHOD__, - 'Error while registering in the loyalty program: ' . $response->getRawResponse() + 'Error while registering in the loyalty program', + ['response' => json_decode($response->getRawResponse(), true)] ); }