listTriggers( )

Retrieves all available custom triggers.

The listTriggers() function lists all custom triggers provided by your business logic. The function is automatically called by Wix eCommerce to populate the custom minimum requirements section of an automatic discount.

Where to find listTriggers()

When you add the Custom Discount Trigger plugin, a folder is automatically added to your site. Use the .js file in the folder to write the code to retrieve all available custom triggers. For more information on setting up your custom triggers, see Tutorial: Custom Discount Trigger Service Plugin.

Method Declaration
Copy
Method Parameters
contextContextRequired

Metadata about the request.

Returns
Return Type:Promise<ListCustomTriggers>
Was this helpful?
Yes
No