Merge pull request #28114 from woocommerce/fix/issue-27972
Update SSR version to check against major versions only closes #27972
This commit is contained in:
commit
decf1805de
|
@ -377,6 +377,11 @@ class WC_Admin_Status {
|
|||
private static function output_plugins_info( $plugins, $untested_plugins ) {
|
||||
$wc_version = Constants::get_constant( 'WC_VERSION' );
|
||||
|
||||
if ( 'major' === WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE ) {
|
||||
// Since we're only testing against major, we don't need to show minor and patch version.
|
||||
$wc_version = $wc_version[0] . '.0';
|
||||
}
|
||||
|
||||
foreach ( $plugins as $plugin ) {
|
||||
if ( ! empty( $plugin['name'] ) ) {
|
||||
// Link the plugin name to the plugin url if available.
|
||||
|
|
|
@ -163,15 +163,6 @@ class WC_Plugin_Updates {
|
|||
$version .= '.' . $new_version_parts[1];
|
||||
}
|
||||
|
||||
if ( 'major' === $release ) {
|
||||
$current_version_parts = explode( '.', Constants::get_constant( 'WC_VERSION' ) );
|
||||
|
||||
// If user has already moved to the major version, we don't need to flag up anything.
|
||||
if ( version_compare( $current_version_parts[0] . '.' . $current_version_parts[1], $new_version_parts[0] . '.0', '>=' ) ) {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $extensions as $file => $plugin ) {
|
||||
if ( ! empty( $plugin[ self::VERSION_TESTED_HEADER ] ) ) {
|
||||
$plugin_version_parts = explode( '.', $plugin[ self::VERSION_TESTED_HEADER ] );
|
||||
|
|
|
@ -9,6 +9,11 @@ defined( 'ABSPATH' ) || exit;
|
|||
|
||||
global $wpdb;
|
||||
|
||||
if ( ! defined( 'WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE' ) ) {
|
||||
// Define if we're checking against major or minor versions.
|
||||
define( 'WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE', 'major' );
|
||||
}
|
||||
|
||||
$report = wc()->api->get_endpoint_data( '/wc/v3/system_status' );
|
||||
$environment = $report['environment'];
|
||||
$database = $report['database'];
|
||||
|
@ -21,7 +26,7 @@ $security = $report['security'];
|
|||
$settings = $report['settings'];
|
||||
$wp_pages = $report['pages'];
|
||||
$plugin_updates = new WC_Plugin_Updates();
|
||||
$untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, 'minor' );
|
||||
$untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, WC_SSR_PLUGIN_UPDATE_RELEASE_VERSION_TYPE );
|
||||
?>
|
||||
<div class="updated woocommerce-message inline">
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue