Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

WooCommercePayments::can_view()publicWC 1.0

Task visibility.

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

No Hooks.

Return

true|false.

Usage

$WooCommercePayments = new WooCommercePayments();
$WooCommercePayments->can_view();

Code of WooCommercePayments::can_view() WC 6.6.1

public function can_view() {
	$has_task_list_previously_completed = ( new TaskList( array( 'id' => 'setup' ) ) )->has_previously_completed();

	return ! $has_task_list_previously_completed && // Do not re-display the task if the task list has already been completed.
		self::is_installed() &&
		self::is_supported() &&
		( $this->get_parent_id() !== 'setup_two_column' || ! self::is_connected() );
}