Ensures any checks for 'woothemes.com' in logic also check for 'woocommerce.com'.

This commit is contained in:
Matty 2016-09-28 12:19:58 +02:00
parent ae75f8b8cd
commit d037c4a3f2
2 changed files with 2 additions and 2 deletions

View File

@ -347,7 +347,7 @@ $pages = $system_status->get_pages();
$version_string = '';
$network_string = '';
if ( strstr( $plugin['url'], 'woothemes.com' ) ) {
if ( strstr( $plugin['url'], 'woothemes.com' ) || strstr( $plugin['url'], 'woocommerce.com' ) ) {
if ( ! empty( $plugin['version_latest'] ) && version_compare( $plugin['version_latest'], $plugin['version'], '>' ) ) {
$version_string = ' &ndash; <strong style="color:red;">' . esc_html( sprintf( _x( '%s is available', 'Version info', 'woocommerce' ), $plugin['version_latest'] ) ) . '</strong>';
}

View File

@ -581,7 +581,7 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller {
$data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
$dirname = dirname( $plugin );
$theme_version_latest = '';
if ( strstr( $data['PluginURI'], 'woothemes.com' ) ) {
if ( strstr( $data['PluginURI'], 'woothemes.com' ) || strstr( $data['PluginURI'], 'woocommerce.com' ) ) {
if ( false === ( $version_data = get_transient( md5( $plugin ) . '_version_data' ) ) ) {
$changelog = wp_safe_remote_get( 'http://dzv365zjfbd8v.cloudfront.net/changelogs/' . $dirname . '/changelog.txt' );
$cl_lines = explode( "\n", wp_remote_retrieve_body( $changelog ) );