How to Hide Add to Cart on Woodmart?
-
Hello, is it possible to hide the Add to Cart button on the Product Page on Woodmart?
I tried to create code snippets to hide it but it doesn’t work at all.
Example Code:
/**
* Hide the "Add to Cart" button on the product page.
*/
function hide_add_to_cart_button_on_product_page() {
if ( is_product() ) {
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
}
}
add_action( 'init', 'hide_add_to_cart_button_on_product_page' );
Found the answer in this thread:
https://xtemos.com/forums/topic/deactivate-remove-add-to-cart-button/
I just need to go Theme Settings > Custom CSS
On Global Custom CSS section of the page, I just have to add this code:
.single_add_to_cart_button {
display: none !important;
}
Hello,
Glad that you found a solution.
if you’re having trouble of any kind issue, please let me know. I’ll do everything I can to help.
Have a good day!
Kind Regards