I would like to add futured image on admin view order pages in Woocommerce. New Column created, but the product image does not appear. What should I do to show the order thumbnail? Thanks.
// Admin Order page new colums
add_filter( 'manage_edit-shop_order_columns', 'add_account_orders_column', 10, 1 );
function add_account_orders_column( $columns ){
$columns['custom-column'] = __( 'New Column', 'woocommerce' );
return $columns;
}
add_action( 'woocommerce_my_account_my_orders_column_custom-column', 'add_account_orders_column_rows' );
function add_account_orders_column_rows( $order ) {
// Example with a custom field
if ( $value = $order->get_meta( 'order_received_item_thumbnail_image' ) ) {
echo esc_html( $value );
}
}