Search.../

deleteServiceOptionsAndVariants( )

Developer Preview

Deletes a serviceOptionsAndVariants object.

Description

Because each service has only a single serviceOptionsAndVariants object, the service won't have any supported options and variants any longer. Instead, the standard Wix Bookings service price calculation is used.

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId: string, options: DeleteServiceOptionsAndVariantsOptions): Promise<void>

deleteServiceOptionsAndVariants Parameters

NAME
TYPE
DESCRIPTION
serviceOptionsAndVariantsId
string

ID of the serviceOptionsAndVariants object to delete.

options
Optional
DeleteServiceOptionsAndVariantsOptions

Returns

Return Type:

Promise<
void
>

Was this helpful?

deleteServiceOptionsAndVariants example

Copy Code
1import { serviceOptionsAndVariants } from 'wix-bookings.v2';
2
3 async function deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId, options) {
4 try {
5 const result = await serviceOptionsAndVariants.deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId, options);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13