Two new optional keys have been added to the tool definition array:
- 'disabled': when true the tool button will appear disabled.
- 'needs_refresh': when running a tool, by default the tool definitions
are retrieved first, then the selected tool is executed,
then the definitions previously retrieved are rendered.
When this key is true the tool definitions are retrieved again
after execution, useful for cases where the tool description
or button enable/disable state changes after the tool execution.
Also now if a tool execution throws an exception a notice will be
shown with the execption message, previously the exception
was unhandled.
Previously 'dirname( __FILE__ )' was used to import files, however, the directory separator was missing.
This commit replaces 'dirname( __FILE__ )' that was introduced in 5370d02484 with __DIR__ and added DIRECTORY_SEPARATOR
Relative include paths in PHP can break whenever the server is running opcache. As such, WordPress.com deploy system refuses to include WooCommerce because of that issue.
This commit changes the relative include paths to absolute include paths.
Relates to #27269
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 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.