WooCommerce product categories are displayed at the bottom of a product page just under the add to cart button.

remove woocommerce-product-categories

You can remove these from the layout by removing the woocommerce_template_single_meta action from the product summary, in your themes functions.php add in …

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );

This will remove the categories aka product meta from the layout.

You can see a lot of these woocommerce hooks in the plugin woocommerce/includes/wc-template-hooks.php – our example above is originally is in this file highlighted.

/**
 * Product Summary Box
 *
 * @see woocommerce_template_single_title()
 * @see woocommerce_template_single_price()
 * @see woocommerce_template_single_excerpt()
 * @see woocommerce_template_single_meta()
 * @see woocommerce_template_single_sharing()
 */
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );

So the action includes the hook and what function we are hooking into it and the priority number – so instead of editing here, you just simply remove_action the desired action in your functions.php including the priority number, the trick is finding out which one you need!

Share:

Leave a Reply