WC_Cart::get_items_needing_shipping()protectedWC 3.0.0

Get only items that need shipping.

Method of the class: WC_Cart{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_items_needing_shipping();

Changelog

Since 3.0.0 Introduced.

WC_Cart::get_items_needing_shipping() code WC 9.4.2

protected function get_items_needing_shipping() {
	return array_filter( $this->get_cart(), array( $this, 'filter_items_needing_shipping' ) );
}