Site icon Hip-Hop Website Design and Development

Trying to listing all product classes and the value vary of all merchandise inside them

I am making an attempt to show an inventory of all product classes and the value vary of the merchandise inside these classes.

E.g

Headwear – £30-£150

Sneakers – £35-£300

The place "Headwear" is the Product Class Title, "£30" is the bottom value of a product inside that class and "£150" is the best.

To date I’ve used the next code to listing the classes, however unsure verify for merchandise inside every and get the costs and so on.

$order = 'asc';
$hide_empty = false ;
$cat_args = array(
    'orderby'    => $orderby,
    'order'      => $order,
    'hide_empty' => $hide_empty,
);
 
$product_categories = get_terms( 'product_cat', $cat_args );
 
if( !empty($product_categories) ){
    echo '
 
<ul>';
    foreach ($product_categories as $key => $class) {
        echo '
 
<li>';
        echo '<a href="'.get_term_link($category).'" >';
        echo $category->identify;
        echo '</a>';
        echo '</li>';
    }
    echo '</ul>
 
 
';
}

Any assist could be significantly appreciated. I’ve requested this on the woocommerce help discussion board however no responses.