protected function supportTMExtraProductOptions($invoice, BaseSource $invoiceSource, /** @noinspection PhpUnusedParameterInspection */ Result $localResult)
    {
        /** @var \WC_Abstract_Order $shopSource */
        $shopSource = $invoiceSource->getSource();
        /** @var WC_Order_Item_Product[] $items */
        $items = $shopSource->get_items(apply_filters('woocommerce_admin_order_item_types', 'line_item'));
        foreach ($items as $item) {
            // If the plugin is no longer used, we may still have an order with
            // products where the plugin was used. Moreover we don't use any
            // function or method from the plugin, only its stored data, so we
            // don'have to check for it being active, just the data being there.
            if (!empty($item['tmcartepo_data'])) {
                $line = &$this->getLineByMetaId($invoice[Tag::Customer][Tag::Invoice][Tag::Line], $item->get_id());
                if ($line !== null) {
                    $commonTags = array(
                        Tag::Quantity => $line[Tag::Quantity],
                        Meta::VatRateSource => Creator::VatRateSource_Parent,
                    );
                    $result[Meta::ChildrenLines] = $this->getExtraProductOptionsLines($item, $commonTags);
                }
            }
        }

        return $invoice;
    }