1
0
Fork 0
mirror of synced 2025-04-02 21:36:14 +03:00

Json decode for correct context view

This commit is contained in:
Alex Komarichev 2024-09-20 15:15:25 +03:00
parent 38f0a0c0a4
commit 43ac5c6517
2 changed files with 5 additions and 3 deletions

View file

@ -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']
);
}

View file

@ -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)]
);
}