In the product admin page, the field "Stock status" should be hidden for grouped products as stock is controlled individually for each of the child products and setting a stock status in the parent product has no effect.
Fixes#20927
To more closely align return value with other date APIs in WC, namely
WC_Data. Includes changing return value to:
1. a WC_DateTime instead of a timestamp when a scheduled occurrence is found
2. null instead of false, similar to the default of WC_Data::set_date_prop()
To take care of instantiating a canonical job queue for use across
all of WooCommerce, and by 3rd party code.
Also use this new API for enqueuing webhooks instead of raw Action
Scheduler APIs.
As a wrapper for Action Scheduler. This implements the WC_Queue_Interface
so it can be used as WC core's job queue. Implementing WC_Queue_Interface
also means this class has more generic and appropriate job queue nomenclature
than Action Scheduler itself. For exsample, it provides a method for
non-delayed jobs, i.e. WC_Queue_Interface::add(), unlike Action Scheduler,
which requires scheduling a job for now(), which while fairly simple, is not
intuitive or immediately obvious to new comers.
This makes it both more clear and convenient to use Action Scheduler
as a simple job queue instead of just a queue for delayed jobs.
To provide an agreed set of public methods that need to be defined
for any class wanting to act as WooCommerce's queue handler.
The require APIs support both delay jobs, by providing APIs to
schedule an action/job/event for some time in the future, and a
non-delayed job API, to add an event to the queue to run as soon
as possible.
This commit fixes a bug in WC_Customer_Download_Log_Data_Store::get_download_logs() that made impossible to change the order in which the query returned the results. This method accepts the arguments order_by and order, but it was ignoring them and always using the default values ('download_log_id' and 'ASC' respectively).
It also introduces a very basic unit test to cover the method main functionality and to make sure that the parameters order and orderby are not ignored anymore.
It seems that the modified method was inspired in WC_Customer_Download_Data_Store::get_downloads() before the same bug was fixed in #18620.