Search...
listPublicPlans( )
Lists public pricing plans.
Description
The listPublicPlans()
function returns a Promise that resolves to a list of up to 100 public pricing plans.
Public plans are visible plans that site visitors can see on the site and purchase.
You do not need "Manage Pricing Plans" permissions to list public plans.
Syntax
function listPublicPlans([planIds: Array<string>], [options: ListPublicPlanOptions]): Promise<Array<PublicPlans>>
listPublicPlans Parameters
NAME
TYPE
DESCRIPTION
planIds
Optional
Array<string>
IDs of public plans to list. You can pass a maximum of 50 IDs. If not specified, all public plans are listed (up to 50), according to the order displayed in the Dashboard. If non-existent IDs are specified, they are ignored and do not cause errors.
options
Optional
ListPublicPlanOptions
Options to use when getting the list of public plans.
Returns
Fulfilled - List of public pricing plans.
Return Type:
Promise<Array<PublicPlans>>
NAME
TYPE
DESCRIPTION
publicPlans
Array<PublicPlan>
List of public pricing plans.
Related Content:
Was this helpful?
List public plans
Copy Code
1import wixPricingPlansBackend from 'wix-pricing-plans-backend';23export function myListPublicPlansFunction() {4 const planIds = [5 "001c0674-d7c9-4c77-acb5-b492b427b201",6 "003d0674-d7c9-4d88-acb5-b492b427b302",7 "011d0123-d7c9-5e44-acb5-d300a123b321"8 ];9 const options = {10 limit: 10,11 skip: 112 }13 return wixPricingPlansBackend.listPublicPlans(planIds, options)14 .then((publicPlans) => {15 // Array of the specified public pricing plan objects16 console.log(publicPlans);17 })18 .catch((error) => {19 console.error(error);20 });21}