mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Display all body responses in the logs
This commit is contained in:
parent
baef2d5408
commit
a58e971cad
1 changed files with 3 additions and 2 deletions
|
@ -87,9 +87,10 @@ trait RequestTrait {
|
|||
if ( isset( $response['response'] ) ) {
|
||||
$output .= 'Response: ' . wc_print_r( $response['response'], true ) . "\n";
|
||||
|
||||
if ( isset( $response['body'] )
|
||||
if (
|
||||
isset( $response['body'] )
|
||||
&& isset( $response['response']['code'] )
|
||||
&& ! in_array( $response['response']['code'], array( 200, 201, 202, 204 ), true ) ) {
|
||||
) {
|
||||
$output .= 'Response Body: ' . wc_print_r( $response['body'], true ) . "\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue