Home › Forums › Support › Add to cart hover in niche missing This topic has 6 replies, 3 voices, and was last updated 3 years, 5 months ago by David. Viewing 7 posts - 1 through 7 (of 7 total) Author Posts October 28, 2020 at 5:48 pm #1508660 nik9 Hello, We just noticed that the “Add to cart” button does not show up after hovering over a product on product archive. (See link) We did not change some thing in CSS or so,,, thanks. 🙂 October 28, 2020 at 6:03 pm #1508673 ElvinStaff Customer Support Hi, I’m not sure I understand what you mean. I don’t see any “Add to cart” button even when I’m hovering on the products. Did you mean the price that fades up when hovered? Ex: “CHF 4.70” October 29, 2020 at 12:55 am #1508865 nik9 Hi Elvin, Yes that is exactly the problem. The price that fades up when hovering is missing…. 🙁 October 29, 2020 at 2:28 am #1508927 nik9 Update: I was able to solve this. Was a CSS issue but I do not understand why this was a problem now haha.. That was working for weeks.. 🙂 But I have now a following question.. I know I can use this code below to change the Add to cart text. add_filter( 'woocommerce_product_add_to_cart_text', function() { return 'Hinzufügen'; } ); Question: Is there a way, that we can change the label text ONLY from products that are sold out? October 29, 2020 at 3:38 am #1509007 DavidStaff Customer Support Hi there, Try this: add_filter( 'woocommerce_product_add_to_cart_text', 'change_sold_out_product_button_text_label', 10, 2 ); add_filter( 'woocommerce_product_single_add_to_cart_text', 'change_sold_out_product_button_text_label', 10, 2 ); function change_sold_out_product_button_text_label( $button_text, $product ) { $stock = array(); // Only for variable products on single product pages if ( $product->is_type('variable') ) { foreach ($product->get_available_variations() as $key => $value){ $stock[] = isset( $value['is_in_stock'] ) ? $value['is_in_stock'] : true; } if( empty( array_filter( $stock ) ) ){ $button_text = __( "Hinzufügen", "woocommerce" ); } } // For all other cases (not a variable product on single product pages) elseif ( ! $product->is_type('variable') && !$product->is_in_stock() ) { $button_text = __( "Hinzufügen", "woocommerce" ); } return $button_text; } October 29, 2020 at 4:01 am #1509044 nik9 great! Thanks 🙂 October 29, 2020 at 4:09 am #1509059 DavidStaff Customer Support You’re welcome Author Posts Viewing 7 posts - 1 through 7 (of 7 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In