diff --git a/src/WPStrava/API.php b/src/WPStrava/API.php index e756e8d..6e632c5 100755 --- a/src/WPStrava/API.php +++ b/src/WPStrava/API.php @@ -45,6 +45,21 @@ class WPStrava_API { $response = wp_remote_post( $url . $uri, $args ); + if ( WPSTRAVA_DEBUG ) { + // phpcs:disable WordPress.PHP.DevelopmentFunctions -- Debug output. + error_log( + print_r( + array( + 'url' => $url . $uri, + 'args' => $args, + 'response' => $response, + ), + true + ) + ); + // phpcs:enable + } + if ( is_wp_error( $response ) ) { throw WPStrava_Exception::from_wp_error( $response ); }