'product_cat',
'orderby' => 'name',
'hide_empty' => '1',
);
$woo_categories = get_categories( $get_woo_cats );
foreach ( $woo_categories as $woo_category ) {
// custom query for woocommerce category
$args_woo_cat = array(
'post_type' => 'product',
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'field' => 'term_id',
'terms' => $woo_category->term_id,
),
),
'posts_per_page' => 4
);
$get_featured_cat = new WP_Query( $args_woo_cat );
if ( $get_featured_cat -> have_posts() ) : ?>
description)) : ?>
description; ?>
have_posts()) :
$get_featured_cat->the_post();
$product = wc_get_product( $get_featured_cat->post->ID ); ?>
-
woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>