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.
If I input infoおおお@test.com as billing email address, automatically change to info@test.com by sanitize_email function.
So at first check the email address by is_email function, after that we must use sanitize_email function.
In case no tax rate is specified for the default catch-all tax rate, the tax rate was an empty string which caused a PHP notice when it was later used in arithmetic operations.
### All Submissions:
* [x] Have you followed the [WooCommerce Contributing guideline](https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md)?
* [x] Does your code follow the [WordPress' coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/)?
* [x] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?
<!-- Mark completed items with an [x] -->
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### Changes proposed in this Pull Request:
Re-indexing `get_available_variations` method values.
Suppose you made changed with `woocommerce_available_variation` hook and skip returning some specific variation product with false value. There is `array_filter` function to filter empty values from `get_available_variations` but it keeps index which convert to js object rather then array on `single-product/add-to-cart/variable.php` template variation form `data-product_variations` attribute, and select box dropdown doesn't show. I just added `array_values` PHP function to reindex after `array_filter` function which convert to js array rather then js object before `get_available_variations` function return.
Closes # .
### How to test the changes in this Pull Request:
1. Before approving pull req just return false on a specific variation via `woocommerce_available_variation` filter.
2. Now check that variation product dropdown doesn't show. Because it needs to reindex array.
### Other information:
* [x] Have you added an explanation of what your changes do and why you'd like us to include them?
* [ ] Have you written new tests for your changes, as applicable?
* [x] Have you successfully ran tests with your changes locally?
<!-- Mark completed items with an [x] -->
### Changelog entry
> Enter a short summary of all changes on this Pull Request. This will appear in the changelog if accepted.
This fixes the case where another plugin sets custom menu ordering to be
true, but its filter runs before WooCommerce's filter. Otherwise
WooCommerce's filter will return false, and disallow the other plugin to
customize its menu items.
This commit changes the way that WC_Background_Updater::task() calls the database update callbacks and adds the WC_Background_Updater instance as the first parameter to the callbacks. This is used in wc_update_350_order_customer_id() (36b6bd79c0/includes/wc-update-functions.php (L1870)) to monitor memory usage while the function is running. This change was intended to ship with PR #17895 (see commit c77b2f20f4) but was accidentaly removed when merging commit 083c994732 from another PR.
Fixes#20718