fixes order hook logic to run hooks when finalizing order

Fixes #2986