Search...
cloneEvent( )
Clones an event, including the registration form, notifications, multilingual translations and ticket configuration from the original event.
Description
The new event's date is automatically set to 14 days from the original event date. If an event with the same title already exists, the new event's title gets a sequence number. For example, if you clone an event named "Leather Crafting 101", the new event's title is "Leather Crafting 101 (1)". You can change the required entity field values while cloning an event.
Admin Method
This function requires elevated permissions to run. This function is not universal and runs only on the backend.
Syntax
function cloneEvent(eventId: string, options: CloneEventOptions): Promise<CloneEventResponse>
cloneEvent Parameters
NAME
TYPE
DESCRIPTION
eventId
string
Event ID.
options
Optional
CloneEventOptions
Optional fields.
Returns
Return Type:
Promise<
CloneEventResponse
>NAME
TYPE
DESCRIPTION
event
V3Event
Cloned event.
Was this helpful?
cloneEvent example
Copy Code
1import { wixEventsV2 } from 'wix-events.v2';23 async function cloneEvent(eventId, options) {4 try {5 const result = await wixEventsV2.cloneEvent(eventId, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13