Created
April 11, 2015 11:36
-
-
Save roborourke/951baa4c4f652547e3a5 to your computer and use it in GitHub Desktop.
Hack to work with external APIs that require ssl verification on a local install of WordPress
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 | |
// include the following in your wp-config.php or any file that is run before WP is loaded | |
global $wp_filter; | |
function hm_kill_sslverify( $args, $url ) { | |
$args['sslverify'] = false; | |
return $args; | |
} | |
$wp_filter = array( | |
'sslverify' => array( | |
0 => array( | |
'remove_ssl_verify_for_local' => array( | |
'function' => 'hm_kill_sslverify', | |
'accepted_args' => 0 | |
) | |
) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment