We have already discussed error_log here. The current_filter() function will return the current WordPress filter or action calling a specific function. The return type is string, so it’s straight forward to just use it. Add the following inside the function…