I'm trying to remove a button that appears when hovering over the images on a woocommerce shop. (See images attached) The product is a variable product.
Failing being able to do this I also tried to format it so it's a normal 'view product' button using the below code. However I'm struggling on how else to format it. Any help much appreciated.
// Change button text on WooCommerce Shop pages
add_filter( 'woocommerce_product_add_to_cart_text', 'woocustomizer_edit_shop_button_text' );
function woocustomizer_edit_shop_button_text() {
global $product;
$product_type = $product->get_type(); // Get the Product Type
// Change text depending on Product type
switch ( $product_type ) {
case "variable":
return __( '£', 'woocommerce' );
break;
case "grouped":
return __( 'View All Products', 'woocommerce' );
break;
case "external":
// Button label is added when editing the product
return esc_html( $product->get_button_text() );
break;
default:
return __( 'Buy Now', 'woocommerce' );
}
}