Source
<dd class="variation-' . sanitize_html_class( sanitize_text_field( $meta['key'] ) ) . '">' . wp_kses_post( wpautop( make_clickable( $meta['value'] ) ) ) . '</dd>
<?php
/**
* Order Item Meta
*
* A Simple class for managing order item meta so plugins add it in the correct format.
*
* @package WooCommerce\Classes
* @deprecated 3.0.0 wc_display_item_meta function is used instead.
* @version 2.4
*/
defined( 'ABSPATH' ) || exit;
/**
* Order item meta class.
*/
class WC_Order_Item_Meta {
/**
* For handling backwards compatibility.
*
* @var bool
*/
private $legacy = false;
/**
* Order item
*
* @var array|null
*/
private $item = null;
/**
* Post meta data
*
* @var array|null
*/
public $meta = null;
/**
* Product object.
*
* @var WC_Product|null
*/
public $product = null;
/**
* Constructor.
*
* @param array $item defaults to array().
* @param \WC_Product $product defaults to null.
*/
public function __construct( $item = array(), $product = null ) {
wc_deprecated_function( 'WC_Order_Item_Meta::__construct', '3.1', 'WC_Order_Item_Product' );
// Backwards (pre 2.4) compatibility.
if ( ! isset( $item['item_meta'] ) ) {
$this->legacy = true;
$this->meta = array_filter( (array) $item );
return;
}
$this->item = $item;
$this->meta = array_filter( (array) $item['item_meta'] );