> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: onPlanArchived(event: PlanArchivedEvent) # Method package: wixPricingPlansBackend # Method menu location: wixPricingPlansBackend --> Events --> onPlanArchived # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-backend/events/on-plan-archived.md # Method Description: An event that triggers when a pricing plan is archived. The `onPlanArchived()` event handler runs when a pricing plan is archived. The received `PlanArchivedEvent` object contains information about the pricing plan that was archived. > **Note:** Backend events don't work when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event triggered when a pricing plan is archived ```javascript // Place this code in the events.js file // of your site's Backend section. // Add the file if it doesn't exist. export function wixPricingPlans_onPlanArchived(event) { const planId = event.data.plan._id; const planDescription = event.data.plan.description; const eventId = event.metadata.id; const eventTime = event.metadata.eventTime; } /* Full event object: * { * "metadata":{ * "id": "3423a637-d7c9-5e44-acb5-337ef4b5d677", * "entityId": "3455d382-a4c3-7e14-def5-340ad4b5d421", * "eventTime": "2021-02-03T14:07:13.105207Z", * "triggeredByAnonymizeRequest": false * }, * "data": { * "plan": { * "_id": "3455d382-a4c3-7e14-def5-340ad4b5d421", * "name": "Visitor Membership", * "description": "Temporary membership for visitors from out-of-town", * "perks": [ ], * "pricing": { * "subscription": { * "cycleDuration": { * "count": 1, * "unit": "MONTH" * }, * "cycleCount": 3 * }, * "price": { * "value": "20", * "currency": "USD" * }, * "freeTrialDays": 0 * }, * "public": false, * "archived": true, * "primary": false, * "hasOrders": true, * "_createdDate": "2019-06-15T12:53:08.489Z", * "_updatedDate": "2020-02-03T14:07:13.076Z", * "slug":"visitor-membership", * "maxPurchasesPerBuyer": 1, * "allowFutureStartDate": false, * "buyerCanCancel" :true, * "termsAndConditions": "Temporary access for visitors only. Not transferrable." * } * } * } */ ``` ---