Skip to content

Instantly share code, notes, and snippets.

@blakemiller99
Created December 5, 2018 23:41
Show Gist options
  • Save blakemiller99/dd17dfb8357662aa870d361375daac3e to your computer and use it in GitHub Desktop.
Save blakemiller99/dd17dfb8357662aa870d361375daac3e to your computer and use it in GitHub Desktop.
Woocommerce - Remove Price & Add to Cart Button (Catalog Mode)
// Hide Price, add to cart
add_action( 'init', 'mito_hide_price_add_cart' );
function mito_hide_price_add_cart() {
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_single_product_summary', 'woocommerce_template_single_price', 10 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment