Add a fallback to cURL version check in system status so it still shows if cURL is installed when the version function is disabled by the host.

This commit is contained in:
Gerhard 2019-01-11 10:38:21 +02:00
parent a7463c5535
commit 11b9f49d18
1 changed files with 2 additions and 0 deletions

View File

@ -572,6 +572,8 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
if ( function_exists( 'curl_version' ) ) {
$curl_version = curl_version();
$curl_version = $curl_version['version'] . ', ' . $curl_version['ssl_version'];
} elseif ( extension_loaded( 'curl' ) ) {
$curl_version = __( 'cURL installed but unable to retrieve version.', 'woocommerce' );
}
// WP memory limit.