Retrieve the name of an action currently being processed.

Signature

doing_action( $action = null )
action
 (string|null) Optional. Action to check. Defaults to null, which checks if any action is currently being run.
Default: null

Return

(boolean) Whether the action is currently in the stack.

Source

function doing_action( $action = null ) {
	return doing_filter( $action );
}
WP Trac GitHub

Link here