WordPress at Your Fingertips
function is not described

WC_Cart::get_cart_item() public WC 1.0

Returns a specific item in the cart.

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

No Hooks.

Return

Array. Item data

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->get_cart_item( $item_key );
$item_key(string) (required)
Cart item key.

Code of WC_Cart::get_cart_item() WC 5.7.1

public function get_cart_item( $item_key ) {
	return isset( $this->cart_contents[ $item_key ] ) ? $this->cart_contents[ $item_key ] : array();
}