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.

Authorization

Request

This endpoint does not take any parameters

Response Object

Fulfilled - When the options are deleted. Rejected - Error message.

Returns an empty object.

Status/Error Codes

Was this helpful?

Delete the options for a product

Copy Code
1import wixStoresBackend from 'wix-stores-backend';
2
3export function deleteProductOptions(productId) {
4 wixStoresBackend.deleteProductOptions(productId)
5 .then(() => {
6 // product options have been deleted
7 })
8 .catch((err) => {
9 // there was an error deleting the options
10 })
11};