Simplify WooPayments task view logic
This commit is contained in:
parent
fbd1464460
commit
c5b12efcf1
|
@ -117,10 +117,7 @@ class WooCommercePayments extends Task {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function can_view() {
|
public function can_view() {
|
||||||
$payments = $this->task_list->get_task( 'payments' );
|
return self::is_supported();
|
||||||
|
|
||||||
return ! $payments->is_complete() && // Do not re-display the task if the general "Payments" task has already been completed.
|
|
||||||
self::is_supported();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue