I have a problem on the "my account" page of my woocommerce store. Indeed, when I log in with a new customer account that has never placed an order, my dashboard has display bugs with disappearing containers.
After testing, the bug disappears only if I place an order with the account in question.
After performing a series of tests, the piece of code that produces the bug is the following (it displays the last command of the connected user):
<?php foreach ($last_order->get_items() as $item) :
$product = $item->get_product();
$thumbnail = $product->get_image(array(50, 50));
if ($product->get_image_id() > 0) {
$item_name = '<div class="item-thumbnail">' . $thumbnail . '</div>'; // You had an extra variable here
}
echo $item_name . $item->get_name();
endforeach;
?>
Do you have any idea where this could be coming from?
In advance, Thank you very much for your help.