That is exactly the problem - it depends on where you put which command.
And that is not the same answer everywhere, because in some positions it becomes a global definition, in others an instance definition and in still other positions it won't work at all.
Please give a link to the website of the plugin you want to modify and tell us where you want to modify it, then we can help