Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created February 13, 2016 18:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save strangerstudios/efd7b7ae6c32e491bb24 to your computer and use it in GitHub Desktop.
Save strangerstudios/efd7b7ae6c32e491bb24 to your computer and use it in GitHub Desktop.
Update the SSLVERSION for CURL to support PayPal Express moving to TLS 1.2
/*
Update the SSLVERSION for CURL to support PayPal Express moving to TLS 1.2
More info: https://devblog.paypal.com/upcoming-security-changes-notice/
Your server will need to be updated to a supported version of OpenSSL for this to work.
Add this code to your active theme's functions.php or a custom plugin.
*/
function my_http_api_curl($handle) {
curl_setopt( $handle, CURLOPT_SSLVERSION, 6 );
}
add_action('http_api_curl', 'my_http_api_curl');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment