Changes ticket definitions order in an event dashboard and the list of available tickets in the ticket picker.
Note: It is possible to use both beforeTicketDefinitionId
and afterTicketDefinitionId
at the same time but only the last one defined will be executed.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function reorderTicketDefinitions(
eventId: string,
options: ReorderTicketDefinitionsOptions,
): Promise<void>;
Event ID.
Optional fields.
import { ticketDefinitionsV2 } from "wix-events.v2";
async function reorderTicketDefinitions(eventId, options) {
try {
const result = await ticketDefinitionsV2.reorderTicketDefinitions(
eventId,
options,
);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.