WordPress at Your Fingertips
function is not described

WC_Cart::filter_items_needing_shipping() protected WC 3.0.0

Filter items needing shipping callback.

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

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->filter_items_needing_shipping( $item );
$item(array) (required)
Item to check for shipping.

Changelog

Since 3.0.0 Introduced.

Code of WC_Cart::filter_items_needing_shipping() WC 5.7.1

protected function filter_items_needing_shipping( $item ) {
	$product = $item['data'];
	return $product && $product->needs_shipping();
}