WC_Cart::filter_items_needing_shipping
Filter items needing shipping callback.
Method of the class: WC_Cart{}
No Hooks.
Returns
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. |
WC_Cart::filter_items_needing_shipping() WC Cart::filter items needing shipping code WC 10.7.0
protected function filter_items_needing_shipping( $item ) {
$product = $item['data'];
return $product && $product->needs_shipping();
}