title: Woocommerce get cart item meta
body: <p>I have a 'Custom field' on my product page that I want to add above the title of a product in a Woocommerce cart page.</p>
  
  <p>This is the custom field data: </p>
  
  <p><a href="https://i.stack.imgur.com/ORjgT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ORjgT.png" alt="enter image description here"></a></p>
  
  <p>I got it to work on a single product card with this PHP code</p>
  
  <pre><code>add_action( 'woocommerce_after_shop_loop_item_title', 'product_card_beschrijving', 2);
   function product_card_beschrijving(){
      global $product;
      $beschrijving = get_post_meta( $product-&gt;id, 'product_card_beschrijving', true ); 
      if ( ! empty( $beschrijving ) ) {
          echo '&lt;span class="beschrijving"&gt;' . $beschrijving . '&lt;/span&gt;';
      }
   }
  </code></pre>
  
  <p>I've tried this same code for the cart page but altered it a little as such but the meta data of the custom field isn't being loaded. I've used <code>$get_item_data</code> and more but can't get it to work</p>
  
  <pre><code>&lt;p class="cart-subtitel"&gt;
      &lt;?php $beschrijving = get_post_meta( $product-&gt;id, 'product_card_beschrijving', true ); echo '&lt;span class="beschrijving"&gt;' . $beschrijving . '&lt;/span&gt;'?&gt;
  &lt;/p&gt;
  </code></pre>