Search...
items
Returns the items that match the query.
Description
Type:
Array<Item>Read Only
NAME
TYPE
DESCRIPTION
publicPlan
PublicPlan
An item that matches the query.
Was this helpful?
Perform a query and get the public pricing plan items from the result
Copy Code
1import wixPricingPlansBackend from 'wix-pricing-plans-backend';23// ...4wixPricingPlansBackend.queryPublicPlans()5 .find()6 .then((results) => {7 if (results.items.length > 0) {8 const items = results.items; // see below9 } else {10 // handle case where no matching items found11 }12 })13 .catch((error) => {14 const queryError = error;15 });161718/* items:19 * [20 * {21 * "plan": {22 * "_id": "5269ddde-a3a6-7c32-abc1-fe8af8331097",23 * "name": "Basic",24 * "description": "This plan provides the basics.",25 * "pricing": {26 * "singlePaymentUnlimited": true,27 * "price": {28 * "value": "50",29 * "currency": "USD"30 * }31 * },32 * "primary": false,33 * "_createdDate": "2021-01-01T15:33:34.860Z",34 * "_updatedDate": "2021-01-14T10:30:30.870Z",35 * "slug": "basic",36 * "allowFutureStartDate": false,37 * "buyerCanCancel": true,38 * "termsAndConditions": "",39 * "perks": [40 * "Essentials only",41 * "For beginners"42 * ]43 * }44 * },45 * {46 * "plan": {47 * "_id": "31c26520-a3a6-7c32-abc1-d4b11e509a92",48 * "name": "Intermediate",49 * "description": "This plan provides intermediate capabilities",50 * "pricing": {51 * "subscription": {52 * "cycleDuration": {53 * "count": 1,54 * "unit": "MONTH"55 * },56 * "cycleCount": 257 * },58 * "price": {59 * "value": "25",60 * "currency": "USD"61 * },62 * "freeTrialDays": 363 * },64 * "primary": false,65 * "_createdDate": "2020-02-14T15:33:34.977Z",66 * "_updatedDate": "2021-01-14T10:30:30.970Z",67 * "slug": "intermediate",68 * "allowFutureStartDate": false,69 * "buyerCanCancel": true,70 * "termsAndConditions": "",71 * "perks": [72 * "Cool templates you can reuse",73 * "Includes the Basic plan"74 * ]75 * }76 * },77 * {78 * "plan": {79 * "_id": "6e01c2ae-b3b6-7a33-abc1-b7daf0fd125c",80 * "name": "Advanced",81 * "description": "This plan provides advanced capabilities",82 * "pricing": {83 * "subscription": {84 * "cycleDuration": {85 * "count": 1,86 * "unit": "YEAR"87 * },88 * "cycleCount": 089 * },90 * "price": {91 * "value": "100",92 * "currency": "USD"93 * }94 * },95 * "primary": false,96 * "_createdDate": "2020-12-14T15:33:35.677Z",97 * "_updatedDate": "2021-01-14T11:33:11.677Z",98 * "slug": "advanced",99 * "allowFutureStartDate": false,100 * "buyerCanCancel": true,101 * "perks": [102 * "Extra utilities, plug-ins",103 * "Includes the Intermediate Plan"104 * ]105 * }106 * },107 * {108 * "plan": {109 * "_id": "a7fff6ae-b3b6-7a33-abc1-2b9f8b39e6c5",110 * "name": "Advanced VIP",111 * "description": "This plan provides a lot of extras that are really cool in addition to the regular Advanced plan",112 * "pricing": {113 * "singlePaymentUnlimited": true,114 * "price": {115 * "value": "125",116 * "currency": "USD"117 * }118 * },119 * "primary": false,120 * "_createdDate": "2021-01-14T15:33:35.782Z",121 * "_updatedDate": "2021-01-14T15:33:35.782Z",122 * "slug": "advanced-vip",123 * "allowFutureStartDate": false,124 * "buyerCanCancel": true,125 * "termsAndConditions": "",126 * "perks": [127 * "Free beer and champagne sent to your home when you purchase the plan",128 * "Discount on our merchandise",129 * "Includes the Advanced plan"130 * ]131 * }132 * }133 * ]134 */