Thanks for the PR and the improvement. Regarding hooks. I would really recommend that the PR also documents the hook so other developers can look them up in the developer guide.
Betty and I are reviewing PR's and we came across the PR 16864 which is linked to this issue.
From the description it looks like it is a duplicate of the PR 15074