Skip to content

Instantly share code, notes, and snippets.

@tylerdigital
Created March 13, 2012 06:50
Show Gist options
  • Save tylerdigital/2027315 to your computer and use it in GitHub Desktop.
Save tylerdigital/2027315 to your computer and use it in GitHub Desktop.
woothemes ping home issue
// In Canvas admin-interface.php
// executed on main theme options page
if ( $pagenow == 'admin.php' && isset( $_GET['page'] ) && $_GET['page'] == 'woothemes' ) {
if ( get_option( 'framework_woo_theme_version_checker' ) == 'true' ) { add_action( 'admin_notices', 'woo_theme_update_notice', 10 ); }
// Which calls theme update notice (if it's not disabled)
if ( ! function_exists( 'woo_theme_update_notice' ) ) {
function woo_theme_update_notice () {
$theme_data = get_theme_data( get_template_directory() . '/style.css' );
$local_version = $theme_data['Version'];
$update_data = woothemes_version_checker( $local_version );
// Which calls version checker which pings home if version_data transient is expired. This is a problem and hangs the entire page if woothemes.com/?feed=updates is not responding
function woothemes_version_checker ( $local_version ) {
...
$version_data = get_transient( $theme_name . '_version_data' );
if( $version_data ){
$latest_version_via_rss = $version_data;
}
// If the transient has expired, run the check.
if ( $latest_version_via_rss == '' ) {
$feed_url = 'http://www.woothemes.com/?feed=updates&theme=' . $theme_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment