I'm trying to filter the message that shows WooCommerce, when the product reservation is not allowed.

The message that is displayed when you want to add in the cart more stock than is avaiblable.

You cannot add that amount to the cart — we have %1$s in stock and you already have %2$s in your cart.

I have found that this message is generated in class-wc-cart.php in the function add_to_cart().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.