Hide button on out of stock product
-
Hi, there is a way to disable a button on out of stock product?
I ve customized it by "ADD TO CART" plugin with a cart icon and it work well but when product is out of stock it show a empity square.
I ve added also this css code :.woocommerce a.button.add_to_cart_button{
border-radius: 50%;
} -
Try using: display: none !important; on the css selector.
-
@alasdair17 said in Hide button on out of stock product:
display: none !important;
thanks for the reply. what is the class that i need to use? i can't found it
Edit. Solved.
here the css code:
.outofstock .button
{
display: none !important;
}
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com