Hi
It might be you are trying to connect from behind a proxy? If you are – that could well be your problem.
Add the following to your config:
define(‘WP_PROXY_HOST’, ‘address.of.your.proxy’);
define(‘WP_PROXY_PORT’, ‘3128’);
define(‘WP_PROXY_BYPASS_HOSTS’, ‘localhost, address.of.your.site’);
if ( defined( ‘WP_PROXY_HOST’ ) && defined( ‘WP_PROXY_PORT’ ) ) {
$stream_default_opts = array(
‘http’ => array(
‘proxy’ => sprintf( ‘tcp://%s:%d’, WP_PROXY_HOST, WP_PROXY_PORT ),
‘request_fulluri’ => true,
),
);
stream_context_set_default( $stream_default_opts );
}
You will then need to find all curl_init() in your plugin and patch (ideally) or add:
if ( defined( ‘WP_PROXY_HOST’ ) && defined( ‘WP_PROXY_PORT’ ) ){
curl_setopt( $ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
curl_setopt( $ch, CURLOPT_PROXY, WP_PROXY_HOST );
curl_setopt( $ch, CURLOPT_PROXYPORT, WP_PROXY_PORT );
}
after each curl_init() call