WooCommerce – Display Product image and name on Orders page

I used the solution here (linked below). It works great. However, it glitches when displaying an order containing a product that has since been deleted. Is there a way to modify the code so that on products that have been deleted it just shows nothing instead of a huge paragraph of gibberish? Just curious!

Original solution was by @meloman : Display order items names in WooCommerce admin orders list