This topic has 4 replies, 2 voices, and was last updated 3 years ago ago by Rose Tyler
Hi,
I want to change the background color and the text of the add to cart button if the product is out of stock.
I used some filter hooks in order to change the text but they changed only the label.
Hello,
Thanks for using XStore.
Provide URL of your product with such a button, and we will help you using custom CSS code.
Regards
Hi,
the first product on this page is out of stock. https://lacorcava.gr/product-category/%ce%b1%cf%80%ce%bf%cf%83%cf%84%ce%ac%ce%b3%ce%bc%ce%b1%cf%84%ce%b1/%cf%84%cf%83%ce%af%cf%80%ce%bf%cf%85%cf%81%ce%bf/
I want to change the background color and the text of the add to cart button.
Thanks in advance,
Andreas
Hello,
Add the next code in Theme Options > Theme custom CSS:
.outofstock .button {
background-color: red !important;
border-color: red !important;
}
Do you use the Loco Translate plugin to translate the site? As we can see the button show not “Read more” text but the translation of it, so just change the translation text.
Regards
Tagged: button, cart, modify, out of stock, themes, woocommerce, wordpress
The issue related to '‘Modify add to cart button for out of stock products’' has been successfully resolved, and the topic is now closed for further responses