- This topic has 1 reply, 2 voices, and was last updated 1 year, 11 months ago by Barbarakilgore.
-
AuthorPosts
-
January 21, 2021 at 10:29 pm #8631
nemke79ParticipantHi, I need help.
How can I delete compare and add to cart icons on thumbnails?
I tried to edit kable-> inc-> woocommerce-> function.php file, but don’t know how..
December 12, 2022 at 4:01 pm #12894
BarbarakilgoreParticipantCode snippet to remove Add to Cart button
Add the following code snippet in the Theme Functions (function.php) file of your currently activated theme.remove_action(‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’);
remove_action(‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’, 20);
The above code snippet will remove the Add to Cart button in shop page as well as product pages.But wait…
Adding a code snippet is the most common method for removing the Add to Cart button completely, and may not be an optimal solution as it would lead to an endpoint, hence affecting your customer retention. Also, you should remove the code snippet every time you need to roll back to its default state. Instead, you should rather consider customizing the Add the Cart button, giving a better shopping experience for your users.
-
AuthorPosts
You must be logged in to reply to this topic.