1'use strict';23// Cart-offer plugins (e.g. WM Cart Benefits) keep their offer definitions where no4// channel reaches them, but every order line an offer added carries the offer id as line meta. The5// orders already extracted are therefore enough to tell the merchant which offers were live, on6// which products, at what price and how often, so each can be re-created as a Wix Automatic7// Discount. The markers come from the profiles' `appliedOffers`; a new cart-offer plugin is data.8// Pure: the caller passes the extracted wc/v3/orders rows. Ids, prices and counts only.910function metaValue(metaData, key) {11 for (const entry of
90 action: `${rows[0].displayName || plugin} gave these cart offers on the old store. They do not move automatically. In Business Manager → Marketing → Automatic Discounts, create one discount per offer, or mark it not needed. Wix applies the price at checkout; it does not show the offer inside the cart. ${[...rows].sort((a, b) => b.orders - a.orders || a.offerId.localeCompare(b.offerId)).slice(0, OFFERS_IN_TEXT).map(describeOffer).join('. ')}.${rows.length > OFFERS_IN_TEXT ? ` And ${rows.length - OFFERS_IN_TEXT} more offer(s), listed by id.` : ''}`,
91 consequence: 'Until re-created, these offer prices are not available on Wix.',
92 deadlineReason: 'Before the DNS switch.',
93 resolutionEvidence: 'An automatic discount exists for each offer, or the operator records it as not needed.',