- correct table name / prefix
- ensure search string has wildcards before & after
- return value is '0' or '1', fix return logic (was returning 'Yes' no
matter what)
Initially it was made more precise to avoid calculating estimates for incomplete addresses. Due to some bad working in template files though, as well as historical precedent, we need to change it back.
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.
Instead of comparing all tables that exist with all tables that are registered with `WC_Install::get_tables()` (which was only introduced a few versions ago in #19436), rewrite the test to verify that all of the tables *registered* actually exist within the database.
This will prevent tests from failing when, for example, they're run against databases that may or may not have additional plugins installed/activated. This also prevents tests from failing when running WooCommerce 4.x (e.g. with WooCommerce Admin) on WordPress < 5.3, since the tables are created but the callback to register the custom tables is never hooked.
The documentation of the method
WC_Plugin_Updates::get_untested_plugins() said that it only considers
active plugins when getting the list of untested plugins, but it
actually considers all installed plugins. This commit simply updates the
documentation to reflect the method behavior.
This commit creates a new method called
WC_Admin_Status::output_plugins_info() that is used to display the
plugins that are installed on the site in the system status report page.
It is used to display both the active and inactive plugins sections and
it was created to remove code duplication.
I don't think that adding this code as a method to WC_Admin_Status is
an ideal solution but it is the best that I could think and it is better
than duplicating code. Suggestions of other places are welcome.