Skip to content

Instantly share code, notes, and snippets.

<a href="https://p2p.onecause.com/tastefestrun/colin-brady-2">I'm running the International Food Fest Race on April 9th to bring wellness, respite and community to caregivers. Please help me support the amazing parents by making a donation through my page, or signing up to run with me!</a>
@colincny
colincny / wp_curl.php
Created December 19, 2016 22:41
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);
// Tell cURL to use TLS 1.2
curl_setopt($handle, CURLOPT_SSLVERSION, 6); // There is a constant you can use but it's apparently not available on all systems.