Skip to content

Instantly share code, notes, and snippets.

@colincny
Created December 19, 2016 22:41
Show Gist options
  • Save colincny/01eb7aaaa9e8e9c1eab68785dbd36114 to your computer and use it in GitHub Desktop.
Save colincny/01eb7aaaa9e8e9c1eab68785dbd36114 to your computer and use it in GitHub Desktop.
Tell the WP cURL handle to use TLS 1.2
// Tell the WP cURL handle to use TLS 1.2
function lab_http_api_curl($handle) {
curl_setopt($handle, CURLOPT_SSLVERSION, 6);
}
add_action('http_api_curl', 'lab_http_api_curl', PHP_INT_MAX, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment