WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Utilities

CartController::get_cart_item() public WC 1.0

Return a cart item from the woo core cart class.

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

No Hooks.

Return

Array.

Usage

$CartController = new CartController();
$CartController->get_cart_item( $item_id );
$item_id(string) (required)
Cart item id.

Code of CartController::get_cart_item() WC 5.8.0

public function get_cart_item( $item_id ) {
	$cart = $this->get_cart_instance();
	return isset( $cart->cart_contents[ $item_id ] ) ? $cart->cart_contents[ $item_id ] : [];
}