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.
function deleteProductOptions(productId: string): Promise<void>;
ID of the product with options to delete.
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
});
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.