Skip to content

Instantly share code, notes, and snippets.

@roborourke
Created April 11, 2015 11:36
Show Gist options
  • Save roborourke/951baa4c4f652547e3a5 to your computer and use it in GitHub Desktop.
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
<?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