-
endlessrange
With just GP Premium, Generate Blocks and WooCommerce enabled, the Out of Stock looks completely button.
How do I fix this?
This is how it works with just these 3 plugins enabled, the product in stock:
https://ibb.co/xY4zD9tThis is what it looks like when the item is out of stock (button is completely wonky).
https://ibb.co/FWDDFQvThanks
-
Hi there,
can you share a link to the page where I can see the wonky button ?
-
endlessrange
-
Hmmm…. Woocommerce should really remove the add to cart from when a product is out of stock.
So I am not sure if theres other code or a another plugin thats changing that behaviour.However you can add this CSS to the site:
.outofstock .quantity.buttons-added { display: none !important; }
it will simply hide the quantity buttons if the product is out of stock.
-
endlessrange
well like I said in my original post, this is just with 3 plugins activated, so another plugin isn’t causing it…
-
Alvind
Hi there,
It seems that an inline style of
display: block
is being added to the “Add to Cart” button when an item is out of stock. Not sure of the source, but you can override it with the CSS that David provided above. -
endlessrange
Is there any way for a better solution? Because once I select variants it shows broken again, and it doesn’t show out of stock immediately here, so people are bound to select it.
-
Swap my CSS for this:
.outofstock .quantity.buttons-added, .woocommerce-variation-add-to-cart-disabled .quantity.buttons-added { display: none !important; }
That will remove the Quantity buttons if either the item is out of stock or the variation cart is disabled.
-
endlessrange
This causes the quantity button to break on items in stock…
-
Add this CSS as well:
.woocommerce-variation-add-to-cart-enabled .quantity.buttons-added { display: flex !important; }
- You must be logged in to reply to this topic.