The name of the function is in ${FUNCNAME[ 0 ]}
FUNCNAME is an array containing all the names of the functions in the call stack, so:
$ ./sample
foo
bar
$ cat sample
#!/bin/bash
foo() {
echo ${FUNCNAME[ 0 ]} # prints 'foo'
echo ${FUNCNAME[ 1 ]} # prints 'bar'
}
bar() { foo; }
bar