Search...
deleteProductOptions( )
Deletes all options for an existing product.
Description
The deleteProductOptions()
function returns a Promise that resolves when the
options for the product with the given ID are deleted.
Syntax
function deleteProductOptions(productId: string): Promise<void>
deleteProductOptions Parameters
NAME
TYPE
DESCRIPTION
productId
string
ID of the product with options to delete.
Returns
Fulfilled - When the options are deleted. Rejected - Error message.
Return Type:
Promise<void>
Was this helpful?
Delete the options for a product
Copy Code
1import wixStoresBackend from 'wix-stores-backend';23export function deleteProductOptions(productId) {4 wixStoresBackend.deleteProductOptions(productId)5 .then(() => {6 // product options have been deleted7 })8 .catch((err) => {9 // there was an error deleting the options10 })11};