Can I restyle the quantity error messages?
WooCommerce Quantity Manager displays 2 types of error messages:
- Inline error messages which appear on the quantity field if you try to type an invalid quantity. These appear when the plugin is preventing you from submitting an incorrect quantity, for example you are trying to enter more than the maximum quantity for a product.
- Error message boxes which appear at the top of the page after an incorrect quantity has been added to the cart. This might happen for quantity rules that cannot be validated before adding the product to the cart, for example order or category-level rules that are validated against the whole cart rather than individual products.
- Inline errors on the single product page
- Quantity error messages on the cart page
Related: How to change the wording of the error messages in WooCommerce Quantity Manager.
Inline quantity errors
The styling and wording of the inline messages comes from the user's web browser and cannot be changed. It is delivered by the browser HTML5 validation on a number input field.
This ensures that the inline error messages are familiar to the user and fit with other websites they visit.
Error message boxes
The styling of the error message boxes is inherited from WooCommerce and your theme. For example, these errors will look identical to the ones that WooCommerce displays on the cart page if a product in your cart is out of stock.
You can restyle these error messages using custom CSS. If you don't know how to do this then you should ask your developer, or you can use our plugin customization service.