Okay, I fixed it. The final code is:
<?php
$args2 = array('post_type' => 'etlap',
'posts_per_page' => 5,
'post__in' => $ids,
'order' => 'post__in');
$query2 = new WP_Query($args2);
?>
<tr>
<td>
<?php echo "Levesek" ?>
</td>
<?php if ($query2->have_posts()): ?>
<?php while ($query2->have_posts()): ?>
<?php $query2->the_post(); ?>
<td>
<?php
$levesek = get_field('levesek');
$leves_adag = get_field('leves_adag');
?>
<?php if ($levesek): ?>
<?php foreach ($levesek as $leves): ?>
<?php setup_postdata($leves); ?>
<?php echo $leves->post_title; ?>
<?php $description = do_shortcode('[woo-product-shortcodes id="' . $leves->ID . '" data_attribute="short_description"]'); ?>
<br><?php echo $description; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php if ($leves_adag == 0): ?>
<br><?php echo "Elfogyott"; ?>
<?php endif; ?>
<?php if ($leves_adag != 0): ?>
<br><?php echo $leves_adag; ?>
<?php $product = new WC_Product('.$leves->ID.'); ?>
<?php if ($product->is_type('simple')): ?>
<br><?php echo "Szipla (vásárlás beillesztése folyamatban)"; ?>
<?php endif; ?>
<?php if ($product->is_type('variable')): ?>
<br><?php echo "Variálható (vásárlás beillesztése folyamatban)"; ?>
<?php endif; ?>
<?php endif; ?>
<?php wp_reset_postdata(); ?>
</td>
<?php endwhile; ?>
<?php endif; ?>
</tr>