Making product image in woocommerce invoice linkable [closed]

have you tried,

add_filter('woocommerce_order_item_thumbnail','reigel_woocommerce_order_item_thumbnail');
function reigel_woocommerce_order_item_thumbnail($item) {
   global $order;
   $_product = $order->get_product_from_item( $item );
   $item = '<a href="' . esc_url( get_permalink( $_product->id ) ) . '"><img src="' . ( $_product->get_image_id() ? current( wp_get_attachment_image_src( $_product->get_image_id(), 'thumbnail') ) : wc_placeholder_img_src() ) .'" alt="' . __( 'Product Image', 'woocommerce' ) . '" height="' . esc_attr( $image_size[1] ) . '" width="' . esc_attr( $image_size[0] ) . '" style="vertical-align:middle; margin-right: 10px;" /></a>';
   return $item
}

Add this to your functions.php.
I have just coded it without testing, but this should work.. let me know if there’s an error.