woocommerce/plugins/woocommerce-blocks/tests/php
Darren Ethier 0cacf5e0da Disallow selecting quantity of stock past what's available. (https://github.com/woocommerce/woocommerce-blocks/pull/1905)
- `useStoreCartItemQuantity` now receives the cartItem instead of the `cartItemKey` as an argument. I didn't notice in previous reviews how it's used in the context where we already have a cartItem so implementing this reduces complexity and makes the hook more precise for it's purpose.
- Add `backorders_allowed` to the CartItem schema for the API. This allows for client to have correct logic for maximum quantity when this value is true.
- Implement the above in the `CartLineItemRow` so that quantity picker is limited by the amount of stock remaining if that is available (`lowStockRemaining`) and the `backorders_allowed` is false.
- maximum quantity is currently hardcoded to a (filtered) value of `99` when other conditions don't apply (see related issue in woocommerce/woocommerce-blocks#1913)
2020-03-10 07:43:57 -04:00
..
Assets Cart & Checkout: conditionally register country and state settings (https://github.com/woocommerce/woocommerce-blocks/pull/1782) 2020-02-20 16:16:32 +01:00
Bootstrap Fix Package::init breakage for including plugin in WC core (https://github.com/woocommerce/woocommerce-blocks/pull/1175) 2019-11-14 12:19:22 -05:00
Domain Fix package init for WooCommerce 3.9 (https://github.com/woocommerce/woocommerce-blocks/pull/1335) 2019-12-09 16:44:28 +00:00
Helpers Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553) 2020-01-17 11:34:15 +00:00
Library Cleanup draft orders (https://github.com/woocommerce/woocommerce-blocks/pull/1855) 2020-03-04 11:08:23 +00:00
Registry Implement PHP DI container and refactor. Also implements new Asset data interface for extendable settings passed to js. (https://github.com/woocommerce/woocommerce-blocks/pull/956) 2019-09-23 14:07:13 -04:00
RestApi Disallow selecting quantity of stock past what's available. (https://github.com/woocommerce/woocommerce-blocks/pull/1905) 2020-03-10 07:43:57 -04:00
mocks Restore back-compat loading of assets registry switch which ensures wcSettings is only loaded when necessary (https://github.com/woocommerce/woocommerce-blocks/pull/1292) 2019-12-02 14:53:36 -05:00