We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c97be9 commit 25195f6Copy full SHA for 25195f6
1 file changed
classes/update/class-update-190.php
@@ -60,8 +60,8 @@ private function migrate_recommendations_slugs() {
60
'name' => \progress_planner()->get_suggested_tasks()->get_task_id_from_slug( $prpl_task_id ),
61
]
62
);
63
- if ( ! empty( $existing_posts ) ) {
64
- // Delete the existing post.
+ if ( ! empty( $existing_posts ) && $existing_posts[0]->ID !== $recommendation->ID ) {
+ // Delete the existing post (but not if it's the current one).
65
\wp_delete_post( $existing_posts[0]->ID, true );
66
}
67
0 commit comments