Online store on WooCommerce. On the page with the list of products, there is a button "add to cart". If you click "add to cart" more times than it is in stock, a small "out of stock" message will appear above the "add to cart" button. You need to write a script and add a shortcode. The message is supposed to appear without reloading the page.