Change string for untested WC extensions to avoid confusions

This commit changes the string that is displayed to the users in the system status report page when an old version of a WC extension is installed and it doesn't declare support for the current WC core version.

The original message was:

"WooCommerce Min/Max Quantities - by WooCommerce - 2.4.11 - 2.4.12 is available - Not tested with the active version of WooCommerce"

The new message is:

"WooCommerce Min/Max Quantities - by WooCommerce - 2.4.11 - This version is not tested with the active version of WooCommerce (update is available)"

The problem with the original message is that it gives users the impression that even the newest version (2.4.12 in the example above) is not tested with the active version of WooCommerce.
This commit is contained in:
Rodrigo Primo 2020-03-12 11:54:18 -03:00
parent 4dde5ee453
commit e61e865a4a
1 changed files with 12 additions and 5 deletions

View File

@ -356,12 +356,11 @@ class WC_Admin_Status {
$plugin_name = '<a href="' . esc_url( $plugin['url'] ) . '" aria-label="' . esc_attr__( 'Visit plugin homepage', 'woocommerce' ) . '" target="_blank">' . $plugin_name . '</a>';
}
$version_string = '';
$has_newer_version = false;
$network_string = '';
if ( strstr( $plugin['url'], 'woothemes.com' ) || strstr( $plugin['url'], 'woocommerce.com' ) ) {
if ( ! empty( $plugin['version_latest'] ) && version_compare( $plugin['version_latest'], $plugin['version'], '>' ) ) {
/* translators: %s: plugin latest version */
$version_string = ' &ndash; <strong style="color:red;">' . sprintf( esc_html__( '%s is available', 'woocommerce' ), $plugin['version_latest'] ) . '</strong>';
$has_newer_version = true;
}
if ( false !== $plugin['network_activated'] ) {
@ -370,7 +369,15 @@ class WC_Admin_Status {
}
$untested_string = '';
if ( array_key_exists( $plugin['plugin'], $untested_plugins ) ) {
$untested_string = ' &ndash; <strong style="color:red;">' . esc_html__( 'Not tested with the active version of WooCommerce', 'woocommerce' ) . '</strong>';
$untested_string = ' &ndash; <strong style="color:red;">';
if ( $has_newer_version ) {
$untested_string .= esc_html__( 'This version is not tested with the active version of WooCommerce (update is available)', 'woocommerce' );
} else {
$untested_string .= esc_html__( 'This version is not tested with the active version of WooCommerce', 'woocommerce' );
}
$untested_string .= '</strong>';
}
?>
<tr>