Hook actionUpdateQuantity

Informations

Quantity update Quantity is updated only when a customer effectively places their order
Hook actionUpdateQuantity
Locations
FO
Type action
Origin core
Aliases [updateQuantity]
Description Quantity is updated only when a customer effectively places their order

Located in

Origin File
core classes/stock/StockAvailable.php
core src/Adapter/Product/Combination/Update/CombinationStockUpdater.php
core src/Adapter/Product/Stock/Update/ProductStockUpdater.php
core src/Core/Stock/StockManager.php

Call of the Hook in the origin file

Hook::exec(
    'actionUpdateQuantity',
    [
        'id_product' => $id_product,
        'id_product_attribute' => $id_product_attribute,
        'quantity' => $stock_available->quantity,
        'delta_quantity' => $deltaQuantity ?? null,
        'id_shop' => $id_shop,
    ]
);