Fix missing shipping recommendation task (#47117)

* Add secret tasklist to exception for hidden list in tasklist API

* Changelog

* Lint
This commit is contained in:
Ilyas Foo 2024-05-03 11:06:33 +08:00 committed by GitHub
parent 51c629dee4
commit 24348366b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix missing shipping-recommendation task

View File

@ -416,7 +416,8 @@ class TaskList {
$tasks_json = array();
// We have no use for hidden lists, it's expensive to compute individual tasks completion.
if ( $this->is_visible() ) {
// Exception: Secret tasklist is always hidden.
if ( $this->is_visible() || 'secret_tasklist' === $this->id ) {
foreach ( $this->tasks as $task ) {
$json = $task->get_json();
if ( $json['canView'] ) {