WordPress at Your Fingertips
function is not described

WC_Admin_Dashboard_Setup::populate_general_tasks() private WC 1.0

Populate tasks from the database.

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

No Hooks.

Return

null. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->populate_general_tasks();

Code of WC_Admin_Dashboard_Setup::populate_general_tasks() WC 5.8.0

private function populate_general_tasks() {
	$tasks = get_option( 'woocommerce_task_list_tracked_completed_tasks', array() );
	foreach ( $tasks as $task ) {
		if ( isset( $this->tasks[ $task ] ) ) {
			$this->tasks[ $task ]['completed']   = true;
			$this->tasks[ $task ]['button_link'] = wc_admin_url( $this->tasks[ $task ]['button_link'] );
		}
	}
}