Sets all pricing plans to no longer be primary.
The clearPrimary()
function returns a Promise that is resolved when there are no pricing plans marked as primary
.
After clearing the primary plan, when viewing pricing plans on the site, no plan is highlighted with a customizable ribbon.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function clearPrimary(): Promise<void>;
import { plans } from "wix-pricing-plans.v2";
export async function myClearPrimaryFunction() {
try {
const clearedPrimary = await plans.clearPrimary();
return;
} catch (error) {
console.error(error);
// Handle the error
}
}
/* Promise resolves to void */
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.