Sets all pricing plans as not primary.
The clearPrimary()
function returns a Promise that resolves when no pricing plan is
marked as a primary plan.
After clearing the primary plan, when viewing pricing plans on the site, no plan is highlighted with a customizable ribbon.
Only users with "Manage Pricing Plans" permissions can clear the primary plan.
function clearPrimary(): Promise<void>;
import { Permissions, webMethod } from "wix-web-module";
import wixPricingPlansBackend from "wix-pricing-plans-backend";
export const myClearPrimaryFunction = webMethod(Permissions.Anyone, () => {
return wixPricingPlansBackend
.clearPrimary()
.then(() => {
// No pricing plans are set as primary. This means
// no plans are highlighted with a custom ribbon
// when displayed on the site.
console.log("No plans are highlighted on the site");
})
.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.