How to find the linked master order -> order item for a Woocommerce subscription

Is there a WooCommerce / Woocommerce Subscriptions (WCS) method or function that can return the standard WC order>order item that matches up with the subscription order item?

I know that when a WC subscription order is processed it creates a standard WC order (master) with a corresponding order item. The WCS order contains the master order ID in the WCS object. But I can’t find any way to find which master order item is linked to the subscription order item. It’s only linked at the order level, and I’m trying to find the link between the items (e.g. subscription order > order item =linked= WC order > order item).

subscriptionOrder WCOrder
orderItem <??????> orderItem

I can get the WCS object and the WC object and can find the link between those two. But what is a way to determine the orderItem linkages?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.