title: Get the order item name in Woocommerce
body: <p>So I have a variable, if I <code>var_dump</code> that variable I get a big array. I'm trying to get the following:</p>
  
  <pre><code>["name"]=&gt; string(26) "Online marketing Duitsland" 
  </code></pre>
  
  <p>The entire array result looks like this:</p>
  
  <pre><code>array(1) { 
    [33]=&gt; object(WC_Order_Item_Product)#9730 (11) { 
      ["extra_data":protected]=&gt; array(9) { 
        ["product_id"]=&gt; int(0) 
        ["variation_id"]=&gt; int(0) 
        ["quantity"]=&gt; int(1) 
        ["tax_class"]=&gt; string(0) "" 
        ["subtotal"]=&gt; int(0) 
        ["subtotal_tax"]=&gt; int(0) 
        ["total"]=&gt; int(0) 
        ["total_tax"]=&gt; int(0) 
        ["taxes"]=&gt; array(2) { 
          ["subtotal"]=&gt; array(0) { } 
          ["total"]=&gt; array(0) { } 
        } 
      } 
      ["data":protected]=&gt; array(11) { 
        ["order_id"]=&gt; int(12291) 
        ["name"]=&gt; string(26) "Online marketing Duitsland" 
        ["product_id"]=&gt; int(11927) 
        ["variation_id"]=&gt; int(0) 
        ["quantity"]=&gt; int(1) 
        ["tax_class"]=&gt; string(0) "" 
        ["subtotal"]=&gt; string(4) "3700" 
        ["subtotal_tax"]=&gt; string(1) "0" 
        ["total"]=&gt; string(4) "3700" 
        ["total_tax"]=&gt; string(1) "0" 
        ["taxes"]=&gt; array(2) { 
          ["total"]=&gt; array(0) { } 
          ["subtotal"]=&gt; array(0) { } 
        } 
      } 
      ["cache_group":protected]=&gt; string(11) "order-items" 
      ["meta_type":protected]=&gt; string(10) "order_item" 
      ["object_type":protected]=&gt; string(10) "order_item" 
      ["id":protected]=&gt; int(33) 
      ["changes":protected]=&gt; array(0) { } 
      ["object_read":protected]=&gt; bool(true) 
      ["default_data":protected]=&gt; array(11) { 
        ["order_id"]=&gt; int(0) 
        ["name"]=&gt; string(0) "" 
        ["product_id"]=&gt; int(0) 
        ["variation_id"]=&gt; int(0) 
        ["quantity"]=&gt; int(1) 
        ["tax_class"]=&gt; string(0) "" 
        ["subtotal"]=&gt; int(0) 
        ["subtotal_tax"]=&gt; int(0) 
        ["total"]=&gt; int(0) 
        ["total_tax"]=&gt; int(0) 
        ["taxes"]=&gt; array(2) { 
          ["subtotal"]=&gt; array(0) { } 
          ["total"]=&gt; array(0) { } 
        } 
      } 
      ["data_store":protected]=&gt; object(WC_Data_Store)#9723 (4) { 
        ["instance":"WC_Data_Store":private]=&gt; object(WC_Order_Item_Product_Data_Store)#9722 (3) { 
          ["internal_meta_keys":protected]=&gt; array(20) { 
            [0]=&gt; string(9) "_order_id" 
            [1]=&gt; string(5) "_name" 
            [2]=&gt; string(11) "_product_id" 
            [3]=&gt; string(13) "_variation_id" 
            [4]=&gt; string(9) "_quantity" 
            [5]=&gt; string(10) "_tax_class" 
            [6]=&gt; string(9) "_subtotal" 
            [7]=&gt; string(13) "_subtotal_tax" 
            [8]=&gt; string(6) "_total" 
            [9]=&gt; string(10) "_total_tax" 
            [10]=&gt; string(6) "_taxes" 
            [11]=&gt; string(11) "_product_id" 
            [12]=&gt; string(13) "_variation_id" 
            [13]=&gt; string(4) "_qty" 
            [14]=&gt; string(10) "_tax_class" 
            [15]=&gt; string(14) "_line_subtotal" 
            [16]=&gt; string(18) "_line_subtotal_tax" 
            [17]=&gt; string(11) "_line_total" 
            [18]=&gt; string(9) "_line_tax" 
            [19]=&gt; string(14) "_line_tax_data" 
          } 
          ["meta_type":protected]=&gt; string(10) "order_item" 
          ["object_id_field_for_meta":protected]=&gt; string(13) "order_item_id" 
        } 
        ["stores":"WC_Data_Store":private]=&gt; array(20) { 
          ["coupon"]=&gt; string(24) "WC_Coupon_Data_Store_CPT" 
          ["customer"]=&gt; string(22) "WC_Customer_Data_Store" 
          ["customer-download"]=&gt; string(31) "WC_Customer_Download_Data_Store" 
          ["customer-download-log"]=&gt; string(35) "WC_Customer_Download_Log_Data_Store" 
          ["customer-session"]=&gt; string(30) "WC_Customer_Data_Store_Session" 
          ["order"]=&gt; string(23) "WC_Order_Data_Store_CPT" 
          ["order-refund"]=&gt; string(30) "WC_Order_Refund_Data_Store_CPT" 
          ["order-item"]=&gt; string(24) "WC_Order_Item_Data_Store" 
          ["order-item-coupon"]=&gt; string(31) "WC_Order_Item_Coupon_Data_Store" 
          ["order-item-fee"]=&gt; string(28) "WC_Order_Item_Fee_Data_Store" 
          ["order-item-product"]=&gt; string(32) "WC_Order_Item_Product_Data_Store" 
          ["order-item-shipping"]=&gt; string(33) "WC_Order_Item_Shipping_Data_Store" 
          ["order-item-tax"]=&gt; string(28) "WC_Order_Item_Tax_Data_Store" 
          ["payment-token"]=&gt; string(27) "WC_Payment_Token_Data_Store" 
          ["product"]=&gt; string(25) "WC_Product_Data_Store_CPT" 
          ["product-grouped"]=&gt; string(33) "WC_Product_Grouped_Data_Store_CPT" 
          ["product-variable"]=&gt; string(34) "WC_Product_Variable_Data_Store_CPT" 
          ["product-variation"]=&gt; string(35) "WC_Product_Variation_Data_Store_CPT" 
          ["shipping-zone"]=&gt; string(27) "WC_Shipping_Zone_Data_Store" 
          ["webhook"]=&gt; string(21) "WC_Webhook_Data_Store" 
        } 
        ["current_class_name":"WC_Data_Store":private]=&gt; string(32) "WC_Order_Item_Product_Data_Store" 
        ["object_type":"WC_Data_Store":private]=&gt; string(18) "order-item-product" 
      } 
      ["meta_data":protected]=&gt; array(0) { } 
    } 
  } 
  </code></pre>
  
  <p>How do I get that specific part?</p>