From 08a9c1b8441a6d01fe006103f5230eb3db0c73c5 Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:04:12 -0300 Subject: [PATCH 1/4] WIP: issue-1154 From 084f7476db414a4e4417da1e079a7e3d193cb7e9 Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:07:35 -0300 Subject: [PATCH 2/4] Improve language for the error messate --- admin/apple-actions/index/class-push.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/apple-actions/index/class-push.php b/admin/apple-actions/index/class-push.php index 451c4f7a..b679e598 100644 --- a/admin/apple-actions/index/class-push.php +++ b/admin/apple-actions/index/class-push.php @@ -446,7 +446,7 @@ private function push( $user_id = null ): void { // Reset the API postmeta if the article is deleted in Apple News. $this->delete_post_meta( $this->id ); - $error_message = __( 'The article seems to be deleted in Apple News. Reindexing the article in Apple News.', 'apple-news' ); + $error_message = __( 'Publish to Apple News: This article was previously deleted in iCloud News Publisher. Due to your automatic publishing settings, it has been recreated on Apple News.', 'apple-news' ); } else { $error_message = __( 'There has been an error with the Apple News API: ', 'apple-news' ) . esc_html( $original_error_message ); } From 472b7abcd7723e9ceca488da1ae52c447f10b369 Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:07:57 -0300 Subject: [PATCH 3/4] Ready for review From b3d330c617fd2deada027230ae75e65de5360f0c Mon Sep 17 00:00:00 2001 From: Renato Alves <19148962+renatonascalves@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:11:49 -0300 Subject: [PATCH 4/4] Make phpunit happy --- tests/admin/apple-actions/index/test-class-push.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/admin/apple-actions/index/test-class-push.php b/tests/admin/apple-actions/index/test-class-push.php index 8cf535e2..0f40e843 100644 --- a/tests/admin/apple-actions/index/test-class-push.php +++ b/tests/admin/apple-actions/index/test-class-push.php @@ -341,7 +341,7 @@ public function test_update_with_deleted_article(): void { try { $action->perform(); } catch ( Action_Exception $e ) { - $this->assertSame( 'The article seems to be deleted in Apple News. Reindexing the article in Apple News.', $e->getMessage() ); + $this->assertSame( 'Publish to Apple News: This article was previously deleted in iCloud News Publisher. Due to your automatic publishing settings, it has been recreated on Apple News.', $e->getMessage() ); } $this->assertEmpty( get_post_meta( $article_id, 'apple_news_api_id', true ) );