You appear to be a bot. Output may be restricted
Description
Gets the count of order items of a certain type.
Usage
$int|string = WC_Abstract_Order::get_item_count( $item_type );
Parameters
- $item_type
- ( string ) optional – Item type to lookup.
Returns
int|string
Source
File name: woocommerce/includes/abstracts/abstract-wc-order.php
Lines:
1 to 10 of 10
public function get_item_count( $item_type = '' ) { $items = $this->get_items( empty( $item_type ) ? 'line_item' : $item_type ); $count = 0; foreach ( $items as $item ) { $count += $item->get_quantity(); } return apply_filters( 'woocommerce_get_item_count', $count, $item_type, $this ); }