The solution for Bash is here: How to determine function name from inside a function
How can I do the same thing in Z shell, getting the function name from inside the function?
Update: there is a similar but distinct question asking about getting the name of the calling function. It is quite plain that the calling function and current function are distinct things. Although the answers are closely related, the questions are entirely distinct.