I just fixed this in the Pro version and am planning on releasing an update soon for HTTPS for the free version. If you can wait a few days it will be fixed.
Awesome! Thanks, SO much for the reply. What great support!. If you need a tester…just let me know… 😉 I look forward to that updated, as once I have that I can move my site to FULL HTTPS!
Thanks again,
nlitend1
Are you pretty code savvy? I can provide a quick snippet to get you up and running quickly if you know how to update a plugin.
Yes. I was already trying to edit the php files when i put in the request. Please send me the snippet. I’d like to give it a go.
Ok, open up widget.php and replace “yelp_widget_curl” with:
/**
* @DESC: CURLs the Yelp API with our url parameters and returns JSON response
*/
function yelp_widget_curl( $signed_url ) {
// Send Yelp API Call using WP's HTTP API
$data = wp_remote_get( $signed_url );
//Use curl only if necessary
if ( empty( $data['body'] ) ) {
$ch = curl_init( $signed_url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HEADER, 0 );
$data = curl_exec( $ch ); // Yelp response
curl_close( $ch );
$data = yelp_update_http_for_ssl( $data );
$response = json_decode( $data );
} else {
$data = yelp_update_http_for_ssl( $data );
$response = json_decode( $data['body'] );
}
// Handle Yelp response data
return $response;
}
/**
* Function update http for SSL
*
*/
function yelp_update_http_for_ssl( $data ) {
if ( ! empty( $data['body'] ) && is_ssl() ) {
$data['body'] = str_replace( 'http:', 'https:', $data['body'] );
} elseif ( is_ssl() ) {
$data = str_replace( 'http:', 'https:', $data );
}
$data = str_replace( 'http:', 'https:', $data );
return $data;
}
And be sure to refresh the widget’s cache.
Works Great! Thank you SO much! What a great plugin and dev.
Highly Recommend Yelp Widget Pro!
Great! I’d love a review if you get a moment: https://ww.wp.xz.cn/support/view/plugin-reviews/yelp-widget-pro
Marking this as resolved (fix will come out in next release).