Gets a product's available variants based on the specified product ID and either option choices or variant IDs.
The getProductVariants()
function returns a Promise that is resolved
to an array of VariantItem
objects when the product variants with the specified
choices or variant IDs are retrieved.
ID of the product whose variants are being retrieved. Pass only this field to retrieve all of the specified product's variants.
Variant options to return. If not specified, all the product's variants are returned.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.