Deprecated. This function has been deprecated. Changes the display order of the pricing plans on the site page and in the Dashboard.
The arrangePlans()
function returns a Promise that resolves when the plans are rearranged
on the site page and in the Dashboard.
To rearrange the order of the plans, provide a list of IDs for all non-archived plans in the desired order, including hidden plans.
Only users with "Manage Pricing Plans" permissions can arrange plans.
Note: Make sure to provide all non-archived plan IDs to avoid unpredictable results.
function arrangePlans(ids: Array<string>): Promise<void>;
IDs of all non-archived plans in the order you want them arranged.
import { Permissions, webMethod } from "wix-web-module";
import wixPricingPlansBackend from "wix-pricing-plans-backend";
export const myArrangePlansFunction = webMethod(Permissions.Anyone, () => {
const ids = [
"23b345b6-c78d-9012-e3f4-567g89h0i01k",
"3fb6a3c8-988b-7895-04bd-5c59ae0b18ea",
"3fb6a3c8-988b-7896-04bd-6c69ae0b18eb",
"4bb6a3c8-877b-7896-10ca-6c69ae0b18eb",
];
return wixPricingPlansBackend
.arrangePlans(ids)
.then(() => {
console.log("Plans rearranged");
})
.catch((error) => {
console.error(error);
});
});
// Returns a promise that resolves to void
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.