2018 Update: Clarifying the answer with 2 possible cases; Added compatibility for woocommerce 3+. So There can be 2 cases: 1) Get product ...
There is at least 2 ways to get custom order item meta data from a defined meta key: 1) Since WooCommerce 3 - Using WC_Data method ...
storing values in post meta. wc_attribute_taxonomy_name_by_id() : string: Get a product attribute name by ID .
Try the following: // Get the $order object from an ID (if needed only) $order = wc_get_order( $order_id); // Loop through order line items ...
All of the functions can be found inside of woocommerce/includes/wc-order-item- functions.php . You will also find functions to manage order items ...
How to do some magic with Order Items in code. Get. Let's begin with WC_Order's get_items() that returns
WooCommerce Order Item Meta API – Get term meta. Usage. $mixed = wc_get_order_item_meta( $item_id, $key, $single );. Parameters. $ ...
Image: WooCommerce shopping cart showing code example of order item meta added to cart line. Image: Display of the database structure ...
WooCommerce Order Item Meta API - Get term meta.
Im using “Extra Product Options (Product Addons) for WooCommerce” to create extra fields on products for this to show. FIELD: -> order item post meta ->-> ...