Merge pull request #26685 from woocommerce/fix/26248

Removed the notice for untested minor version updates
This commit is contained in:
Peter Fabian 2020-06-15 21:40:22 +02:00 committed by GitHub
commit 0c96b1452d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 35 deletions

View File

@ -45,13 +45,6 @@ class WC_Plugin_Updates {
*/
protected $major_untested_plugins = array();
/**
* Array of plugins lacking testing with the minor version.
*
* @var array
*/
protected $minor_untested_plugins = array();
/**
* Common JS for initializing and managing thickbox-based modals.
*/
@ -103,29 +96,6 @@ class WC_Plugin_Updates {
| Methods for getting messages.
*/
/**
* Get the inline warning notice for minor version updates.
*
* @return string
*/
protected function get_extensions_inline_warning_minor() {
$upgrade_type = 'minor';
$plugins = ! empty( $this->major_untested_plugins ) ? array_diff_key( $this->minor_untested_plugins, $this->major_untested_plugins ) : $this->minor_untested_plugins;
$version_parts = explode( '.', $this->new_version );
$new_version = $version_parts[0] . '.' . $version_parts[1];
if ( empty( $plugins ) ) {
return;
}
/* translators: %s: version number */
$message = sprintf( __( "<strong>Heads up!</strong> The versions of the following plugins you're running haven't been tested with the latest version of WooCommerce (%s).", 'woocommerce' ), $new_version );
ob_start();
include 'views/html-notice-untested-extensions-inline.php';
return ob_get_clean();
}
/**
* Get the inline warning notice for major version updates.
*

View File

@ -45,7 +45,6 @@ class WC_Plugins_Screen_Updates extends WC_Plugin_Updates {
$this->new_version = $response->new_version;
$this->upgrade_notice = $this->get_upgrade_notice( $response->new_version );
$this->major_untested_plugins = $this->get_untested_plugins( $response->new_version, 'major' );
$this->minor_untested_plugins = $this->get_untested_plugins( $response->new_version, 'minor' );
$current_version_parts = explode( '.', Constants::get_constant( 'WC_VERSION' ) );
$new_version_parts = explode( '.', $this->new_version );
@ -59,10 +58,6 @@ class WC_Plugins_Screen_Updates extends WC_Plugin_Updates {
$this->upgrade_notice .= $this->get_extensions_inline_warning_major();
}
if ( ! empty( $this->minor_untested_plugins ) ) {
$this->upgrade_notice .= $this->get_extensions_inline_warning_minor();
}
if ( ! empty( $this->major_untested_plugins ) ) {
$this->upgrade_notice .= $this->get_extensions_modal_warning();
add_action( 'admin_print_footer_scripts', array( $this, 'plugin_screen_modal_js' ) );