Removed the notice for untested minor version updates

With the increased cadence of releases it becomes necessary that we address the `WC tested up to` header's usefulness. It isn't practical to require everyone to update their extensions every month, especially given that we are only doing backwards compatible minor releases. The only case I can think of where we might want to check the minor version is if the Stable tag on Core is downgraded, but due to the naming of the header, this doesn't make any sense.

I considered making this a wildcard of some kind but I think most would bind to a full major version anyway and so this isn't worth the time to add it. As an aside, the tests in `plugin-updates.php` seem to indicate that a header of `WC tested up to: 4` would apply to the entire major version cycle, so wildcards already exist!
This commit is contained in:
Christopher Allford 2020-06-03 14:36:06 -07:00
parent 919276fd90
commit ffe2257f2d
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' ) );