Injecting imported functions using a core plugin