woocommerce/plugins/woocommerce-blocks/tests/php/RestApi/StoreApi/Controllers
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
..
Cart.php Update and select shipping rates dynamically (https://github.com/woocommerce/woocommerce-blocks/pull/1794) 2020-03-05 20:54:05 +01:00
CartCoupons.php Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553) 2020-01-17 11:34:15 +00:00
CartItems.php 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
CartOrder.php Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553) 2020-01-17 11:34:15 +00:00
CartShippingRates.php Update and select shipping rates dynamically (https://github.com/woocommerce/woocommerce-blocks/pull/1794) 2020-03-05 20:54:05 +01:00
Customer.php Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553) 2020-01-17 11:34:15 +00:00
ProductAttributeTerms.php Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553) 2020-01-17 11:34:15 +00:00
ProductAttributes.php Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553) 2020-01-17 11:34:15 +00:00
ProductCollectionData.php Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553) 2020-01-17 11:34:15 +00:00
Products.php Validate store API schema in unit tests (https://github.com/woocommerce/woocommerce-blocks/pull/1553) 2020-01-17 11:34:15 +00:00