Search...
deleteProductOptions( )
Delete all options from a specific product. Only available when variant management is disabled.
Admin Method
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function deleteProductOptions(_id: string): Promise<void>
deleteProductOptions Parameters
NAME
TYPE
DESCRIPTION
_id
string
ID of the product with options to delete.
Returns
Return Type:
Promise<
void
>Was this helpful?
deleteProductOptions example
Copy Code
1import { products } from 'wix-stores.v2';23 async function deleteProductOptions(id) {4 try {5 const result = await products.deleteProductOptions(id);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13