I want to override stock update function of the core files of PrestaShop. I don't know where it is located in the files.
basically, I want to call an external API when the stock of the products is updated. (only when the stock is updated, like when a product is purchased or manually product stock update through backend ).
I think you don't need to override anything. It's better to create a module and use available hooks to manage your requirements, such as
actionObjectOrderAddAfter,actionOrderStatusPostUpdate,actionOrderStatusUpdatewithin front-end andactionObjectProductAddAfter,actionObjectProductDeleteAfter,actionObjectProductUpdateAfter.