Hide some prices in the Shop or Category Archive pages only based on the fact that there are options for the product


I have some products that can be purchased as they are displayed, however some, require the customer to provide additional information for customization.

I want to hide prices for those products on the Shop and Category Archive pages.

I tried the following code, but it has not worked.

//hide price by cat on shop page
add_action( ‘woocommerce_after_shop_loop_item_title’, ‘hide_loop_product_prices’, 1 );
function hide_loop_product_prices(){
global $product;

if( is_product_category(printed-tape) ):

// Hide prices
remove_action('woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );



, Sam Weinstein 3 years 2020-06-04T16:10:49-05:00 0 Answers 97 views 0

Leave an answer