deleteProductOptions( )


Deletes all options for an existing product.

The deleteProductOptions() function returns a Promise that resolves when the options for the product with the given ID are deleted.

Method Declaration
Copy
function deleteProductOptions(productId: string): Promise<void>;
Method Parameters
productIdstringRequired

ID of the product with options to delete.

Delete the options for a product
JavaScript
import wixStoresBackend from "wix-stores-backend"; export function deleteProductOptions(productId) { wixStoresBackend .deleteProductOptions(productId) .then(() => { // product options have been deleted }) .catch((err) => { // there was an error deleting the options }); }
Errors

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

Did this help?