addSitePlugin

Developer Preview
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Adds a site plugin to a slot within an app created by Wix.

Note: To use this function, Your app must have a site plugin extension. Learn more about site plugins.

Signature

Copy
1

Parameters

NameTypeDescription
pluginIdstringID of the site plugin, which you can find in your app's site plugin extension in the Wix Dev Center.
optionsaddSitePluginOptionsOptions to use when adding a site plugin.

addSitePluginOptions object

Copy
1
NameTypeDescription
placementPluginPlacementInformation about the slot in which you want to add the plugin. Learn more about the slots that are available on Wix app pages.

PluginPlacement object

Copy
1
NameTypeDescription
appDefinitionIdstringID of the Wix app.
widgetIdstringID of the host widget.
slotIdstringID of the slot.

Returns

Copy
1

Errors

The addSitePlugin() function can reject with the following errors:

CodeMessage
3001Slot occupied
3002Slot not found
3003Error adding plugin
3004Error replacing existing plugin
3005Error loading modal data
3006Aborted by user
3007Site not published yet

Examples

To set up a dashboard client, refer to the setup guide.

Add a site plugin

Copy
1
Was this helpful?
Yes
No