If foo() is in a class are you calling it correctly ?
e.g. within the plugin class,
$this->foo();
or from outside the class, you need a class instance,
$x = new MyPluginClass();
$x->foo();
or make foo static,
MyPluginClass::foo();
Once foo() in is functions.php, depedning how it's declared, foo() is probably in global scope, so just calling
foo();
would work.
Ian.