He everyone I would like to change the button “in de winkelmand” to sold-out when the product is sold out.
I have tried to disable the product single like attached below to get rid of that weird looking box.
But now need to change the text
.product .single_variation {
display: none !important;
}
nm-variable-add-to-cart-button single_add_to_cart_button button alt disabled wc-variation-is-unavailable
Unfortunately without a result, can anyone point me in the right direction?
is the link to the site. Xs is sold out on this product the rest is in stock.
Thank you.
3
Answers
If I understand your question, you want to change the text? The
add to cart
text is filterable. Using the filterwoocommerce_product_single_add_to_cart_text
. This will show the button as long as you allow backorders.This should work fine. Tested and confirmed.
Want to change “sold Out” text with another text, then this will solve your problem with WooCommerce Way. Please add this code to your theme functions.php. But please don’t forget to use a child theme