Last active
May 12, 2020 13:52
-
-
Save wapcrazut/764e8015047cdd29c62cee3534931574 to your computer and use it in GitHub Desktop.
Force Wordpress HTTP Requests to always verify SSL
This file contains hidden or 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 | |
// Add this to your child's theme functions file | |
// Source: https://surniaulula.com/2018/apps/wordpress/fix-sslverifyfalse-for-plugin-theme-update-checks/ | |
add_filter( 'https_ssl_verify', '__return_true', PHP_INT_MAX ); | |
add_filter( 'http_request_args', 'http_request_force_ssl_verify', PHP_INT_MAX ); | |
function http_request_force_ssl_verify( $args ) { | |
$args['sslverify'] = true; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment