Code
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', 30 );
If you want to hide the “add to cart button” in the product details page then kindly follow the below steps.
Open the file in this path /wp-content/themes/theme-folder/functions.php using some editor like DreamWeaver and scroll to the end of the file then append the below code,
Note : If you have used the child theme then get into the file path /wp-content/themes/childtheme-folder/functions.php.
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', 30 );
This site uses Akismet to reduce spam. Learn how your comment data is processed.
We Love to Deliver Useful and Easy to Customize WordPress Themes for Our Clients…
9.00 A.M. to 6.00 P.M.(IST) UTC/GMT +05:30
We aim to answer all questions within 24 hours.In some cases the waiting time can be extended to 48 hours.Support requests sent during weekends or public holidays will be processed on next Monday or the next business day.
We appreciate your patience and thank you for understanding.
Leave A Comment?