"hooks": "./hooks.json"The hooks entry links to a json file, relative to the 'package.json' file. This file lists all registered hooks inside the hooks property:
"hooks": [ {"name": "dw.order.calculate", "script": "./calculate.js"} ]A hook entry has a 'name' and a 'script' property.
To provide a fallback for existing implementations, the default implementation calls the hook dw.ocapi.shop.basket.calculate. However, this hook is deprecated, and calling it will create entries in the deprecated API usage logs. You should override this function to use dw.order.calculate instead.
If you provide your own implementation, you should provide and use the following hooks. Best practice is to use the hook manager to retrieve them in the calculate hook, and avoid calling them directly.