$value ) error_log( "\t". trim( $header ) . ': ' . trim($value) ); if ( isset($response['body']) ) error_log( "Response body: " . trim($response['body']) ); } } add_action( 'http_api_debug', 'wp_http_request_log', 10, 3 ); function wp_http_response_log( $response, $r, $url ) { error_log( "{$r['method']} {$url} HTTP/{$r['httpversion']}" ); error_log( "{$response['response']['code']} {$response['response']['message']}" ); return $response; } add_filter( 'http_response', 'wp_http_response_log', 10, 3 ); function wp_http_error_log_info() { echo "

".sprintf(__('Logging HTTP request messages to %s'), ini_get('error_log') ). "

"; } add_action('admin_notices', 'wp_http_error_log_info');