I am using woocommerce and i want to show private product after login user. I already done coding but its not showing product.
My code is :-
$args = array( 'post_type' => 'product', 'posts_per_page' => -1, 'product_cat' => 'wholesalers', 'orderby' => 'rand','post_status'=>'private' )
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); ?>
Plz anybody can help me on this ?