Skip to content

Instantly share code, notes, and snippets.

@BFTrick
Created May 6, 2016 21:05
Show Gist options
  • Save BFTrick/f30feea1a553f58cd3d92666c7c9c535 to your computer and use it in GitHub Desktop.
Save BFTrick/f30feea1a553f58cd3d92666c7c9c535 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