Skip to content

Commit 696d80c

Browse files
authored
Merge pull request #691 from ProgressPlanner/filip/v19/fix-user-task-points
Dont celebrate all user tasks
2 parents 549ed2d + fd12443 commit 696d80c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

classes/class-suggested-tasks.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,11 @@ public function rest_prepare_recommendation( $response, $post ) {
528528
$response->data['prpl_points'] = 0;
529529
}
530530

531+
// Assign point only to golden user task.
532+
if ( 'user' === $provider->get_provider_id() ) {
533+
$response->data['prpl_points'] = ( ! empty( $post->post_excerpt ) && \str_contains( $post->post_excerpt, 'GOLDEN' ) ) ? 1 : 0;
534+
}
535+
531536
// This has to be the last item to be added because actions use data from previous items.
532537
$response->data['prpl_task_actions'] = $provider->get_task_actions( $response->data );
533538
}

0 commit comments

Comments
 (0)