Automattic\WooCommerce\Internal\Fulfillments
FulfillmentUtils::has_pending_items
Check if an order has pending items.
Method of the class: FulfillmentUtils{}
No Hooks.
Returns
true|false. True if there are pending items, false otherwise.
Usage
$result = FulfillmentUtils::has_pending_items( $order, $fulfillments ): bool;
- $order(WC_Order) (required)
- The order object.
- $fulfillments(array) (required)
- An array of fulfillments to check.
FulfillmentUtils::has_pending_items() FulfillmentUtils::has pending items code WC 10.3.3
public static function has_pending_items( WC_Order $order, array $fulfillments ): bool {
$pending_items = self::get_pending_items( $order, $fulfillments );
return ! empty( $pending_items );
}