<ul class="homepage-category">
<?php
$prod_cat_args = array(
'taxonomy' => 'product_cat',
'orderby' => 'id',
'hide_empty' => true,
'parent' => 0
);
$woo_categories = get_categories( $prod_cat_args );
foreach ( $woo_categories as $woo_cat ) {
$woo_cat_id = $woo_cat->term_id;
$woo_cat_name = $woo_cat->name;
$woo_cat_slug = $woo_cat->slug;
echo '<li class="main-cat-item">';
$category_thumbnail_id = get_term_meta($woo_cat_id, 'thumbnail_id', true);
$thumbnail_image_url = wp_get_attachment_image_src( $category_thumbnail_id, 'medium')[0];
echo '<a href="' . get_term_link( $woo_cat_id, 'product_cat' ) . '"><img src="' . $thumbnail_image_url . '"/> <h4>' . $woo_cat_name . '</h4></a>';
echo "</li>\n";
}
?>
</ul>
$price
на $price_format = number_format($price, 0, ',', ' ');