woocommerce/plugins/woocommerce-blocks/assets/js/editor-components/utils
Alba Rincón 92387e2912 Prevent `Featured Product` block from breaking when product is out of stock + hidden from catalog (https://github.com/woocommerce/woocommerce-blocks/pull/6166)
* Prevent accessing the first element of the `parentProduct` array if empty

* Include all products regardless of their `stock_status`

By default, the `/wc/store/v1/products` endpoint does not return products with
`outofstock` stock status. We want the users to be able to select any product
regardless of its stock status, we need to explicitly request them using the
`stock_status` query param.

* Use the optional chaining operator

Co-authored-by: Tomasz Tunik <tomasztunik@gmail.com>
2022-03-31 15:24:10 +02:00
..
index.js Prevent `Featured Product` block from breaking when product is out of stock + hidden from catalog (https://github.com/woocommerce/woocommerce-blocks/pull/6166) 2022-03-31 15:24:10 +02:00