- Add PHP League's Container package via Composer.
- Add an ObjectContainer class that encapsulates all the configuration
and insulates the codebase from the concrete DI engine used.
- Add an improved ReflectionContainer class that will allow to
register individual classes as singletons while autowiring.
- Use ObjectContainer to resolve the WooCommerce class, everything
instantiated with "new" inside it, and all singletons that are
usually obtained via WC() function.
- Introduce the CustomerProvider class.
- Introduce a service provider to resolve WC_Queue_Interface,
this replaces the WC_Queue class.
- Mark as obsolete all the replaced "instance()" methods,
and the entire WC_Queue class.
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 method was create in commit 9f65d2a1fc and it was used only once inside WC_Shipping::calculate_shipping(). But commit 4c4f26ff41 removed this call to WC_Shipping::get_default_method() and left the method unused.
* Don't add shipping zone debug message when doing ajax
Prevent an issue where the "Customer matched zone" debug message is shown twice after first selecting a shipping method and then changing a product's quantity in cart and clicking Update cart.
* Don't pass event object to cart.update_cart
Prevent accidentally preserving cart notices when `wc_update_cart` event is triggered on body. If the event object is passed to update_cart() as the first param, it evaluates to true, forcing existing notices to be preserved.
* Pass custom arguments to cart.update_cart()
Instead of simply not passing the event object, pass any custom arguments, so it's possible to do something like: $( body ).trigger( 'wc_update_cart', true ); to still preserve notices if needed.
`_deprecated_function` has conditional which is checking if third param (replacement) is null. Passing replacement as empty string to this function will fail this test and the end of triggered error will look like this: `Use instead.` instead of `with no alternative available.`. This PR removes all occurrences of empty strings in this function.