The feature was using option names prefixed with
"woocommerce_attribute_lookup__". That double underscore breaks WP
standards for option names. The option names have been changed
so that they use a single underscore instead.
There's a new option, 'woocommerce_attribute_lookup__direct_updates'.
When set to 'yes', updates to the lookup table are performed as soon
as the change happen; otherwise, a scheduled action will do it,
the hook name is 'woocommerce_run_product_attribute_lookup_update_callback'
(the existing hook in the DataRegenerator class is renamed to
'woocommerce_run_product_attribute_lookup_update_callback')
Also, the settings page has a new "Advanced" section with a checkbox
to control the value of that new option; the section is visible only
when the feature has been enabled via LookupDataStore::show_feature.
Lookup entries for a product or a variation are created whenever
the product is created, including untrashing and duplication
(not yet when an existing product is modified).
The default functionality within the `ThemeSupport` class has an unintended
side-effect of breaking the existing default functionality within the
`wc_get_theme_support()` function. Since the default set in the support
class is prioritized over the one given to `ThemeSupport::get_option()`,
the WordPress options set in the Customizer are never used for images.
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.
- Renaming to prevent conflicts with the existing method in
the newer PHPUnit used in PHP 8.
- Making it static because "assertIsInt" is static too, so it'll be
easier to replace in the future.
Previously, if the product didn't have an explicit low stock value
amount the value of the woocommerce_notify_low_stock_amount option,
which is a string, was returned verbatim.
Also, update related unit tests to create the option value as a string,
and to check that the value returned by woocommerce_notify_low_stock_amount
is always an integer.