Search...
clearPrimary( )
Sets all pricing plans as not primary.
Description
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.
Syntax
function clearPrimary(): Promise<void>
clearPrimary Parameters
This function does not take any parameters.
Returns
Return Type:
Promise<void>
Related Content:
Was this helpful?
Make no plans primary, clearing the highlight and the ribbon on the site
Copy Code
1import wixPricingPlansBackend from 'wix-pricing-plans-backend';23export function myClearPrimaryFunction() {4 return wixPricingPlansBackend.clearPrimary()5 .then(() => {6 // No pricing plans are set as primary. This means7 // no plans are highlighted with a custom ribbon8 // when displayed on the site.9 console.log("No plans are highlighted on the site");10 })11 .catch((error) => {12 console.error(error);13 });14 }1516// Returns a promise that resolves to void