WordPress at a glance
function is not described

WC_Abstract_Legacy_Order::has_meta() public WC 1.0

Deprecated from version 3.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

has_meta function for order items. This is different to the WC_Data version and should be removed in future versions.

{} It's a method of the class: WC_Abstract_Legacy_Order{}

No Hooks.

Return

Array. of meta data.

Usage

$WC_Abstract_Legacy_Order = new WC_Abstract_Legacy_Order();
$WC_Abstract_Legacy_Order->has_meta( $order_item_id );
$order_item_id(int) (required)
-

Changelog

Deprecated 3.0

Code of WC_Abstract_Legacy_Order::has_meta() WC 5.0.0

<?php
public function has_meta( $order_item_id ) {
	global $wpdb;

	wc_deprecated_function( 'WC_Order::has_meta( $order_item_id )', '3.0', 'WC_Order_item::get_meta_data' );

	return $wpdb->get_results( $wpdb->prepare( "SELECT meta_key, meta_value, meta_id, order_item_id
		FROM {$wpdb->prefix}woocommerce_order_itemmeta WHERE order_item_id = %d
		ORDER BY meta_id", absint( $order_item_id ) ), ARRAY_A );
}