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.

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

Хуков нет.

Возвращает

bool.

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

$result = WC_Meta_Box_Order_Data::order_has_no_shipping( $order );
$order(WC_Order) (обязательный)
Order object.

Код WC_Meta_Box_Order_Data::order_has_no_shipping() WC 11.3.0

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