Pagination not working in Woocommerce?

Hi all. Deduce the products from Woocommerce via WP_Query(), looks like this:
$category = get_queried_object();
$paged = ( get_query_var( 'page' ) ) ? get_query_var( 'page' ) : 1;
$args = array(
 'post_type' => 'product',
 'paged' => $paged,
 $category->taxonomy => $category->slug,
);
$posts = new WP_Query($args);
if($posts->have_posts()):
 while($posts->have_posts()): $posts->the_post();
 get_template_part( 'templates/content/product-cat', 'product-cat' );
endwhile;
wp_reset_postdata();
endif;

Below are trying to get the pagination function the_posts_pagination(). On the page nothing appears, I tried not to interfere in the standard WP_Query(), ie the design was this:
if(have_posts()):
 while(have_posts()): the_post();
 get_template_part( 'templates/content/product-cat', 'product-cat' );
endwhile;
wp_reset_postdata();
endif;

Also do not want to display pagination, although $paged, I get int(1)and $posts->max_num_pages I have a float(2), tried to use kama_pagenavi(), the pagination is displayed but when going to the second page displays the same items as on the first. Please tell me what could be the problem?
April 19th 20 at 12:04
0 answer

Find more questions by tags WooCommerceWordPress