Because we send our WC Order Mails straight to our CRM i need the Subscription parent ID of the subscription renewals like
echo 'shop_orderid===' . $order->id . '___<br>'; // Order ID
I found
$parent_id = $order->get_parent_id();
but that doesnt work - i just get a 0 ...
BR Alex
You can get the parent order ID from the renewal ID by first getting the subscriptions that are associated with the renewal order (it returns as an array but there will be only 1 as each renewal order is specific to a subscription), and then by getting the (parent) order ID from the subscription.