changeCurrency( )


Deprecated. This function will continue to work until November 8, 2024, but a newer version is available at changeCurrency().

Migration Instructions. If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to changeCurrency(). To migrate to the new function:

  1. Add the new import statement:
Copy
import { ticketDefinitionsV2 } from "wix-events.v2";
  1. Look for any code that uses ticketDefinitions.changeCurrency(), and replace it with ticketDefinitionsV2.changeCurrency(). Update your code to work with the new changeCurrency() response properties.
  2. Test your changes to make sure your code behaves as expected.

Changes the currency for all tickets per event.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Events - all permissions
Manage Ticket Definitions
Learn more about app permissions.
Method Declaration
Copy
function changeCurrency(options: ChangeCurrencyOptions): Promise<void>;
Method Parameters
optionsChangeCurrencyOptions

This example uses a deprecated function.

JavaScript
import { ticketDefinitions } from "wix-events.v2"; async function changeCurrency(options) { try { const result = await ticketDefinitions.changeCurrency(options); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?