Skip to content

Commit d357f8c

Browse files
authored
Merge branch 'develop' into filip/fix-user-task-pending
2 parents 5fca2e9 + 2ce5bf1 commit d357f8c

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Bugs we fixed:
99
* Exclude taxonomies which are marked as not indexable in Yoast SEO
1010
* Improve completed task check for "Unpublished content" task
1111
* Remove awarded point if the golden todo task is set back to pending status
12+
* Fix "Delete the 'Sample Page' page" interactive task
13+
* Remove 3rd party plugin tasks if they are deactivated.
1214

1315
= 1.7.0 =
1416

assets/js/recommendations/sample-page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ prplInteractiveTaskFormListener.customSubmit( {
1010
taskId: 'sample-page',
1111
popoverId: 'prpl-popover-sample-page',
1212
callback: () => {
13-
const post = new wp.api.models.Post( {
13+
const post = new wp.api.models.Page( {
1414
id: samplePageData.postId,
1515
} );
1616
post.fetch().then( () => {

classes/suggested-tasks/class-tasks-manager.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,10 @@ public function evaluate_task( Task $task ) {
254254
return false;
255255
}
256256
$task_provider = $this->get_task_provider( $task->provider->slug );
257-
if ( ! $task_provider ) {
258-
return false;
259-
}
260-
261-
// Check if the task is no longer relevant.
262-
if ( ! $task_provider->is_task_relevant() ) {
257+
if ( ! $task_provider || ! $task_provider->is_task_relevant() ) {
263258
// Remove the task from the published tasks.
264259
\progress_planner()->get_suggested_tasks_db()->delete_recommendation( $task->ID );
260+
return false;
265261
}
266262

267263
return $task_provider->evaluate_task( $task->task_id );

readme.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ Bugs we fixed:
121121
* Exclude taxonomies which are marked as not indexable in Yoast SEO
122122
* Improve completed task check for "Unpublished content" task
123123
* Remove awarded point if the golden todo task is set back to pending status
124+
* Fix "Delete the 'Sample Page' page" interactive task
125+
* Remove 3rd party plugin tasks if they are deactivated.
124126

125127
= 1.7.0 =
126128

0 commit comments

Comments
 (0)