Automattic\WooCommerce\Admin\Features\Fulfillments

FulfillmentUtils::has_pending_items │ public static │ WC 1.0

Check if an order has pending items.

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

Хуков нет.

Возвращает

bool. True if there are pending items, false otherwise.

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

$result = FulfillmentUtils::has_pending_items( $order, $fulfillments ): bool;
$order(WC_Order) (обязательный)
The order object.
$fulfillments(массив) (обязательный)
An array of fulfillments to check.

Код FulfillmentUtils::has_pending_items() WC 11.2.2

public static function has_pending_items( WC_Order $order, array $fulfillments ): bool {
	$pending_items = self::get_pending_items( $order, $fulfillments );
	return ! empty( $pending_items );
}