WC_Meta_Box_Order_Data::order_has_no_shipping │ private static │ WC 1.0

Whether an order has no persisted shipping method.

A shipping line is order-time fulfillment evidence that remains stable when a merchant later changes the ordered catalog products. Orders that retain one, including Store API local pickup orders, must keep showing shipping details.

Method of the class: WC_Meta_Box_Order_Data{}

No Hooks.

Returns

bool.

Usage

$result = WC_Meta_Box_Order_Data::order_has_no_shipping( $order );
$order(WC_Order) (required)
Order object.

WC_Meta_Box_Order_Data::order_has_no_shipping() code WC 11.1.2

private static function order_has_no_shipping( $order ) {
	return 0 === count( $order->get_shipping_methods() );
}