Â
Note: This module is universal. Functions in this module can run on both the backend and frontend, unless specified otherwise.
The Back In Stock Settings API allows you to manage whether or not to collect requests from customers to receive back in stock notifications.
Learn more about back in stock notification settings.
To use the Back In Stock Settings API, import { backInStockSettings } from the ‘wix-ecom-backend’ module:
It’s important to note the following points before starting to code:
collectionStates
must be set to true
. Use startCollectingRequests()
to update collection states.The following functions in Back In Stock Settings API are restricted and only run if you elevate permissions using the wix-auth
elevate()
function:
Warning: Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.