An event that fires when an inventory item's information is updated.
The onInventoryItemUpdated()
event handler runs when information for an inventory item
is updated in a store.
Note: Backend events don't work when previewing your site.
function onInventoryItemUpdated(event: InventoryItemUpdatedEvent): void;
Information about the updated inventory item.
// Place this code in the events.js file
// of your site's Backend section.
export function wixStores_onInventoryItemUpdated(event) {
let inventoryItemId = event.inventoryItemId;
}
/* Full event object:
*
* {
* "inventoryItemId":"70170fa0-6ae1-ea9c-46e8-775207d7babc",
* "externalId":"8fe8f05f-951e-1563-b917-88adf8284543",
* "trackInventory":true
* }
*
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.