Disable cURL SSL verification in WordPress

/**
 * Don't verify SSL certificates
 */
add_action( 'http_api_curl', function( $handle ) {
	curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, false );
	curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, false );
});