Skip to content

Commit

Permalink
Merge pull request #1176 from alleyinteractive/feature/issue-1154/sup…
Browse files Browse the repository at this point in the history
…port-handling-deleted-articles

Issue-1154: Improve language for error message
  • Loading branch information
renatonascalves authored Oct 9, 2024
2 parents 0f278ad + b3d330c commit af09a03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin/apple-actions/index/class-push.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down
2 changes: 1 addition & 1 deletion tests/admin/apple-actions/index/test-class-push.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand Down

0 comments on commit af09a03

Please sign in to comment.