Order Object

// Get $product object from $order / $order_id
 
$order = new WC_Order( $order_id );
$items = $order->get_items();
 
foreach ( $items as $item ) {
 
    $product = wc_get_product( $item['product_id'] );
 
    // Now you have access to (see above)...
 
    $product->get_type();
    $product->get_name();
    // etc.
    // etc.
 
}

Author: Wojciech Borowicz

I hope this post will help you to do what you need.
In case you want some assistance click here to get in touch 

check out other blog posts