Snippets: Display Product Category under Title for WooCommerce Products

add_action( 'woocommerce_shop_loop_item_title', function() {
	if ( function_exists( 'wpex_get_first_term_link' ) && $link = wpex_get_first_term_link( null, 'product_cat' ) ) {
		echo '<div class="shop-entry-category">' . $link . '</div>';
	}
}, 11 );
All PHP snippets should be added via a child theme's functions.php file.