WC_Cart::filter_items_needing_shipping()protectedWC 3.0.0

Filter items needing shipping callback.

Метод класса: WC_Cart{}

Хуков нет.

Возвращает

true|false.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->filter_items_needing_shipping( $item );
$item(массив) (обязательный)
Item to check for shipping.

Список изменений

С версии 3.0.0 Введена.

Код WC_Cart::filter_items_needing_shipping() WC 8.7.0

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