Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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