getSelectedVariantId( )


Gets the variant ID of the selected product variant.

This function is currently only available for Wix Studio sites.

The getSelectedVariantId() function returns a Promise that is resolved when the selected product variant's ID is retrieved.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<string>
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?