Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save EricBusch/9f2d23c2439491bc1baf06a75390971f to your computer and use it in GitHub Desktop.
Save EricBusch/9f2d23c2439491bc1baf06a75390971f to your computer and use it in GitHub Desktop.
Remove the action which adds [Add to Cart] & [Buy Now] buttons to the WooCommerce Product Loop. [datafeedr]
<?php
/**
* Remove the action which adds [Add to Cart] & [Buy Now] buttons
* to the WooCommerce Product Loop
*/
function mycode_remove_add_to_cart_from_loop() {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
}
add_action( 'init', 'mycode_remove_add_to_cart_from_loop' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment