Wix Blocks: Providing Entry Points to Upgrade Your App

3 min read
Wix Blocks is open to all Wix Studio users. To get access to Blocks, join Wix Studio.
If you published your Blocks App in the Wix App Market and adapted it to a pricing plan, there are a few ways to allow site creators to upgrade their app to another plan. All these ways lead site creators to your app's pricing page. 

A default Upgrade action button

Blocks automatically adds an upgrade upgrade icon to the widget's action bar, once you set up a pricing plan for it. Note that this button cannot be removed. 
Default premium action button
Add text and a link from a custom panel, to enable site creators to upgrade the app from a panel.
Settings panel
To add a text and link to your panel: 
  1. Go to the Panels tab. 
  2. Add a Text element to the panel.
  3. Click the element's Settings
  4. Insert a short call to action in the Text field.
  5. Set the code to the Link field through Velo. The link uses your App ID and Instance ID: 
1import wixApplication from 'wix-application';
2
3const appInstance = await wixApplication.getDecodedAppInstance();
4const upgradeURL = `https://www.wix.com/apps/upgrade/${appInstance.appDefId}?appInstanceId=${appInstance.instanceId}`;
5$w('#<panelRighTextComponent>').link = upgradeUrl; 
Add a link or a button to your Dashboard page, to enable site creators to upgrade from their Dashboard. 
Dashboard with upgrade
To add an upgrade button or link to your Dashboard:
  1. Go to your App's Dashboard dashboard page. 
  2. Add a button or text element through the Add add panel. 
  3. In the Dashboard code, set the link to use your App ID and Instance ID. For example, if it's a button:
1import wixApplication from 'wix-application';
2
3const appInstance = await wixApplication.getDecodedAppInstance();
4const upgradeURL = `https://www.wix.com/apps/upgrade/${appInstance.appDefId}?appInstanceId=${appInstance.instanceId}`;
5$w('#<yourButton>').link = upgradeUrl; 

Did this help?

|