Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
AdditionalPayments::can_view
Task visibility.
Метод класса: AdditionalPayments{}
Хуков нет.
Возвращает
true|false.
Использование
$AdditionalPayments = new AdditionalPayments(); $AdditionalPayments->can_view();
Код AdditionalPayments::can_view() AdditionalPayments::can view WC 10.5.2
public function can_view() {
if ( null !== $this->can_view_result ) {
return $this->can_view_result;
}
// Always show task if there are any gateways enabled (i.e. the Payments task is complete).
if ( self::has_gateways() ) {
$this->can_view_result = true;
} else {
$this->can_view_result = false;
}
return $this->can_view_result;
}