Search.../

updateOrder( )

Developer Preview

Updates an order's checkoutForm and/or archived status.

Note: This function is restricted and only runs if you elevate permissions using the wix-auth.elevate() function.

Syntax

function updateOrder(identifiers: UpdateOrderIdentifiers, fields: Array<string>, options: UpdateOrderOptions): Promise<UpdateOrderResponse>

updateOrder Parameters

NAME
TYPE
DESCRIPTION
identifiers
UpdateOrderIdentifiers

An object containing identifiers for the order to be updated.

fields
Array<
string
>

Set of field paths to update.

options
Optional
UpdateOrderOptions

An object representing the available options for updating an order.

Returns

Return Type:

Promise<
UpdateOrderResponse
>
NAME
TYPE
DESCRIPTION
order
Order

Updated order.

Was this helpful?

updateOrder example

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