WC_Admin_Dashboard_Setup::get_completed_tasks_count()publicWC 1.0

Return # of completed tasks

{} It's a method of the class: WC_Admin_Dashboard_Setup{}

No Hooks.

Return

Int.

Usage

$WC_Admin_Dashboard_Setup = new WC_Admin_Dashboard_Setup();
$WC_Admin_Dashboard_Setup->get_completed_tasks_count();

Code of WC_Admin_Dashboard_Setup::get_completed_tasks_count() WC 6.7.0

public function get_completed_tasks_count() {
	$completed_tasks = array_filter(
		$this->get_tasks(),
		function( $task ) {
			return $task->is_complete();
		}
	);

	return count( $completed_tasks );
}