> 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: getPlanStats() # Method package: wixPricingPlansV2 # Method menu location: wixPricingPlansV2 --> plans --> getPlanStats # Method Link: https://dev.wix.com/docs/velo/apis/wix-pricing-plans-v2/plans/get-plan-stats.md # Method Description: Gets statistics about the pricing plans. Currently provides only the total number of pricing plans, including archived plans. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Get number of plans (dashboard page code) ```javascript import { plans } from 'wix-pricing-plans.v2'; export async function myGetPlanStatsFunction() { try { const planStats = plans.getPlanStats(); return planStats; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * { * "totalPlans": 8 * } */ ``` ## Get number of plans (export from backend code) ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { plans } from 'wix-pricing-plans.v2'; import { elevate } from 'wix-auth'; export const myGetPlanStatsFunction = webMethod(Permissions.Anyone, async () => { try { const elevatedGetPlanStats = elevate(plans.getPlanStats); const planStats = elevatedGetPlanStats(); return planStats; } catch (error) { console.error(error); // Handle the error } }); /* Promise resolves to: * { * "totalPlans": 8 * } */ ``` ---