<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class W2PShopOrderUtil {
	public static function getOrderName($item, $wc_order): string {
		$items = $wc_order->get_items();
		$item_sequence = 1;
		foreach ( $items as $order_item ) {
			if ( $order_item->get_id() === $item->get_id() ) {
				break;
			}
			$item_sequence++;
		}
		return 'Order-' . $wc_order->get_order_number() . '-' . $item_sequence;
	}

}