woocommerce_get_order_item_meta

The WooCommerce woocommerce get order item meta function.

Description

woocommerce_get_order_item_meta( $item_id, $key, (bool) $single = true ); 

Parameters (3)

0. $item_id
The item id.
1. $key
The key.
2. $single — Optional. (bool) => true
The single.

Usage

  1. if ( !function_exists( 'woocommerce_get_order_item_meta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The item id. 
  5. $item_id = null; 
  6.  
  7. // The key. 
  8. $key = null; 
  9.  
  10. // The single. 
  11. $single = true; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = woocommerce_get_order_item_meta($item_id, $key, $single); 
  15.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. function woocommerce_get_order_item_meta( $item_id, $key, $single = true ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_get_order_item_meta' ); 
  3. return wc_get_order_item_meta( $item_id, $key, $single );