Woocommerce Quantity selection box shows on products with only 1 in stock

I just updated to Woocommerce 7.2.0 and now on my product pages that only have 1 in stock, i get a product quantity box show up with 1 in it.

You can’t do anything with it as there is only one product in stock.

It appears that a change that was made may be conflicting with Themeco Pro on the Ethos theme.

It appears it is in some way related to this CSS in the ethos.css:

input[readonly]:not(input[type=submit])

I have posted this at Woocommerce as well.

Kind Regards

Lee

Hello Lee,

Thanks for writing in!

When there is only 1 product, the quantity box is a read-only element. The theme’s built-in CSS only disables the cursor using this CSS code:

input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] {
    cursor: not-allowed;
}

The rest is coming from the browser which disables the increment/decrement buttons since it is a read-only. The only course of action is to “Add to Cart”.

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.