How to remove “Select Options” on mobile
-
How to remove the “Select options” button below the images on mobile version?
Attachments:
You must be
logged in to view attached files.
add this in your child theme function.php
How to change Select Options -> eg. Chose Size
add_filter( ‘woocommerce_product_add_to_cart_text’ , ‘custom_woocommerce_product_add_to_cart_text’ );
function custom_woocommerce_product_add_to_cart_text() {
global $product;
$product_type = $product->product_type;
switch ( $product_type ) {
case ‘simple’:
return __( ‘Add to cart’, ‘woocommerce’ );
break;
case ‘variable’:
return __( ‘Chose Size’, ‘woocommerce’ );
break;
}
}
You can change ‘Chose Size’ to your own text.
Hi orders-9631,
Thanks for reaching to us.
Did you try @AlexWa Custom Code? Please let me know.
Regards,
I use this code in my theme. If I have a single product without variants, I display “Add to Cart.” If the product has variants, I display options such as “chose size”.
Hi AlexWa,
Thanks for your help.
I will keep this topic opening till topic author confirms his situation.
Regards,
Hello,
Sorry, but I could not get it to work. I want to completely remove the text, not change it.
Thanks!
Hi orders-9631,
Please add the following Custom CSS code to Theme Settings > Custom CSS > Custom CSS for mobile:
.wd-product.wd-hover-standard .product-wrapper .wd-add-btn {
display: none;
}
Regards,
Hello
I have same issue but adding the css code does not work.
Attachments:
You must be
logged in to view attached files.
Hi martin-9344,
Please submit your own topic and share me your url, then I can take a look and provide better support.
Regards,
Hellp,
Hide select options for mobile after update woocommerce.
CSS
.wd-product.wd-hover-alt .wd-add-btn>a{
display:none !important
}
this was working for me without functions, only CSS.
Hi Mike,
Thanks for sharing solutions.
Regards,