Created
August 22, 2016 17:38
-
-
Save thomasplevy/0a78d2a7c39600562ac934e5e41f6e1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // do not copy this line to your functions.php | |
/** | |
* Force TLS 1.2 for WordPress HTTP requests | |
* | |
* BEWARE: | |
* If TLS 1.2 becomes compromised and a newer version is released or required you will need to update | |
* this snippet! | |
* | |
* This also may not work | |
* | |
* More info at https://lifterlms.com/docs/lifterlms-stripe-tls-1-2/ | |
*/ | |
function my_tls_fix( $version ) { | |
curl_setopt( $handle, CURLOPT_SSLVERSION, 6 ); | |
} | |
add_filter( 'http_api_curl', 'my_tls_fix' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment