Simliar to #9506, but this time for master where we should remove entirely the ability to import hooks from plugins.