Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks

WooCommercePayments::can_view()publicWC 1.0

Task visibility.

{} Это метод класса: WooCommercePayments{}

Хуков нет.

Возвращает

true|false.

Использование

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

Код WooCommercePayments::can_view() WC 7.1.0

public function can_view() {
	$payments = $this->task_list->get_task( 'payments' );

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