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.
See example pricing page
A default Upgrade action button
Blocks automatically adds an upgrade icon to the widget's action bar, once you set up a pricing plan for it. Note that this button cannot be removed.
Add an Upgrade link from a panel
Add text and a link from a custom panel, to enable site creators to upgrade the app from a panel.
To add a text and link to your panel:
- Go to the Panels tab.
- Add a Text element to the panel.
- Click the element's Settings.
- Insert a short call to action in the Text field.
- 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 an Upgrade link or button from a Dashboard page
Add a link or a button to your Dashboard page, to enable site creators to upgrade from their Dashboard.
To add an upgrade button or link to your Dashboard:
- Go to your App's Dashboard page.
- Add a button or text element through the Add panel.
- 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?
|