Search...
onInventoryItemUpdated( )
An event that fires when an inventory item's information is updated.
Description
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.
Syntax
function onInventoryItemUpdated(event: InventoryItemUpdatedEvent): void
onInventoryItemUpdated Parameters
NAME
TYPE
DESCRIPTION
event
InventoryItemUpdatedEvent
Information about the updated inventory item.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
An event when an inventory item's information is updated
Copy Code
1// Place this code in the events.js file2// of your site's Backend section.34export function wixStores_onInventoryItemUpdated(event) {5 let inventoryItemId = event.inventoryItemId;6}78/* Full event object:9 *10 * {11 * "inventoryItemId":"70170fa0-6ae1-ea9c-46e8-775207d7babc",12 * "externalId":"8fe8f05f-951e-1563-b917-88adf8284543",13 * "trackInventory":true14 * }15 *16 */