WordPress at Your Fingertips
function is not described

WC_Cart::get_item_data() public WC 1.0

Gets and formats a list of cart item data + variations for display on the frontend.

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

No Hooks.

Return

String.

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->get_item_data( $cart_item, $flat );
$cart_item(array) (required)
Cart item object.
$flat(true|false)
Should the data be returned flat or in a list.
Default: false

Code of WC_Cart::get_item_data() WC 5.6.0

public function get_item_data( $cart_item, $flat = false ) {
	wc_deprecated_function( 'WC_Cart::get_item_data', '3.3', 'wc_get_formatted_cart_item_data' );

	return wc_get_formatted_cart_item_data( $cart_item, $flat );
}