The documentation for WooCommerce Blocks has moved to the WooCommerce monorepo.
Please refer to the documentation in the new location as the files in this repository will no longer be updated and the repository will be archived.
Zip file for testing: woocommerce-gutenberg-products-block.zip
Prevent Cart and Checkout notices from disappearing immediately after adding. (8253)
- Add an item to your cart. Open the same item in the editor.
- In a new tab go to the Cart block.
- In the editor set the item to be out of stock.
- In the Cart block, update the item's quantity, ensure you see a notice.
- Open the console. Type:
wp.data.dispatch( 'core/notices' ).createNotice( 'error', 'error from console', { context: 'wc/cart', } );
- Ensure your error appears alongside the out of stock notice.
- Repeat for the mini-cart.