WC_Cart::get_cart_item PHP Method

get_cart_item() public method

Returns a specific item in the cart.
public get_cart_item ( string $item_key ) : array
$item_key string Cart item key.
return array Item data
    public function get_cart_item($item_key)
    {
        if (isset($this->cart_contents[$item_key])) {
            return $this->cart_contents[$item_key];
        }
        return array();
    }
WC_Cart