Output link to category from WP_Query loop of woocommerce products

You can use get_the_term_list() to output a comma-separated list of links to product categories:

<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
    <li class="product-list__item">
        <a href="https://wordpress.stackexchange.com/questions/274473/<?php the_permalink() ?>">
            <?php the_title(); ?>
        </a>

        <?php echo get_the_term_list( get_the_ID(), 'product_cat', '', ', ' ); ?>
    </li>
<?php endwhile; ?>

Note that when you’re inside ‘the loop’ (i.e. between $loop->the_post(); and endwhile) you don’t need to pass an ID to get_permalink(), you can just use the_permalink().

Also, in your code you’re missing the last > from the opening anchor tag, make sure to fix that.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)