-
-
Save mommaroodles/db85c4837888ad860bd4c7c7c98ae380 to your computer and use it in GitHub Desktop.
Remove Add to Cart Buttons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function patricks_remove_loop_button(){ | |
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); // removes the add to cart button on the shop page | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); //removes the add to cart button on the single product page | |
} | |
add_action('init','patricks_remove_loop_button'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment