In WooCommerce, i've disabled quantities to be shown in the settings page (Woocommere > Settings > Products > Inventory > Stock Display Format), however if someone wanted to see how much you had in stock, all they'd need to do is just enter a large number until it threw an error: https://screencast.com/t/JZppIFAaBH
I'm by no means an expert in PHP, and in my research I found a similar topic from a few years ago here: Remove the stock quantity from WooCommerce cart error messages but I was unsuccessful in making that code work in the functions.php file. I'm not sure if something has changed since then. Can anyone provide any input in how I can modify the code in WooCommerce to just not toss out the actual inventory numbers on the front end?