wc_get_order_item_meta( int $item_id, string $key, bool $single = true )
WooCommerce Order Item Meta API – Get term meta.
Description Description
Parameters Parameters
- $item_id
-
(Required) Item ID.
- $key
-
(Required) Meta key.
- $single
-
(Optional) Whether to return a single value. (default: true).
Default value: true
Return Return
(mixed)
Source Source
File: includes/wc-order-item-functions.php
function wc_get_order_item_meta( $item_id, $key, $single = true ) { $data_store = WC_Data_Store::load( 'order-item' ); return $data_store->get_metadata( $item_id, $key, $single ); }