I manage product inventory by manually entering the stock. When I have 2 in stock, but a guest adds 3 to their cart, WooCommerce shows the following error message:
I have located the code for this error message in the following file: woocommerce/includes/class-wc-cart.php.
I made an attempt to copy this file into the following location in my child theme: mytheme/woocommerce/templates/includes/class-wc-cart.php. I then edited the message within the copy, and clicked save, thinking it would work. Instead, it broke my site (good think I'm using an FTP client, so I quickly reverted).
What am I doing wrong here? Is there a step I am missing in order to change this message? I thought simply copying it to my child theme would overwrite the original file as provided by WooCommerce.
Thank you, R