Hook actionOverrideQuantityAvailableByProduct

Informations

Override available quantity by product Allows modules to override the available quantity returned by StockAvailable::getQuantityAvailableByProduct().
Hook actionOverrideQuantityAvailableByProduct
Locations
FO
Type action
Origin core
Aliases
Description Allows modules to override the available quantity returned by StockAvailable::getQuantityAvailableByProduct().

This hook has a $check_exceptions parameter set to false (check permission exceptions, see explaination here).

This hook has a $chain parameter set to true (hook will chain the return of hook module, see explaination here).

Located in

Origin File
core classes/stock/StockAvailable.php

Call of the Hook in the origin file

Hook::exec(
            'actionOverrideQuantityAvailableByProduct',
            [
                'id_product' => $id_product,
                'id_product_attribute' => $id_product_attribute,
                'id_shop' => $id_shop,
            ],
            null,
            false,
            true,
            false,
            null,
            true
        );