Retrieve the number of times an action is fired.

Signature

did_action( $tag )
tag
 (string) The name of the action hook.

Return

(int) The number of times action hook $tag is fired.

Source

function did_action($tag) {
	global $wp_actions;

	if ( ! isset( $wp_actions[ $tag ] ) )
		return 0;

	return $wp_actions[$tag];
}
WP Trac GitHub

Link here