Skip to content

Instantly share code, notes, and snippets.

@mommaroodles
Forked from BFTrick/functions.php
Created May 17, 2019 11:25
Show Gist options
  • Save mommaroodles/db85c4837888ad860bd4c7c7c98ae380 to your computer and use it in GitHub Desktop.
Save mommaroodles/db85c4837888ad860bd4c7c7c98ae380 to your computer and use it in GitHub Desktop.
Remove Add to Cart Buttons
<?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