Skip to content

Instantly share code, notes, and snippets.

Created May 25, 2017 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9a0ade4b5f5d4f58afc52edbc28a41d7 to your computer and use it in GitHub Desktop.
Save anonymous/9a0ade4b5f5d4f58afc52edbc28a41d7 to your computer and use it in GitHub Desktop.
function clean_commerce_shopping_cart_remove() {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
remove_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
}
add_action('init', 'clean_commerce_shopping_cart_remove' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment