Skip to content

Commit 8ccf2b5

Browse files
committed
Do not log 401 response body (#4343)
1 parent a44699a commit 8ccf2b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/class-wc-stripe-api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public static function retrieve( $api ) {
245245
// If we get a 401 error, we know the secret key is not valid.
246246
if ( is_array( $response ) && isset( $response['response'] ) && is_array( $response['response'] ) && isset( $response['response']['code'] ) && 401 === $response['response']['code'] ) {
247247
// Stripe redacts API keys in the response.
248-
WC_Stripe_Logger::log( "Error: GET {$api} returned a 401 " . print_r( $response, true ) );
248+
WC_Stripe_Logger::log( "Error: GET {$api} returned a 401" );
249249

250250
return null; // The UI expects this empty response in case of invalid API keys.
251251
}

0 commit comments

Comments
 (0)