WordPress at Your Fingertips
function is not described

WC_Admin_Dashboard_Setup::get_completed_tasks_count() public WC 1.0

Return # of completed tasks

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

No Hooks.

Return

null. Nothing.

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 5.8.0

public function get_completed_tasks_count() {
	$completed_tasks = array_filter(
		$this->tasks,
		function( $task ) {
			return $task['completed'];
		}
	);

	return count( $completed_tasks );
}