There is a setting labeled “Automatically update Apple News” which prevents posts from being updated once they’re already in Apple News. However, what you’ve identified here is old posts being saved and published since they’ve never been in Apple News.
The latest version of the plugin sets the date metadata for the post in Apple News which the app will soon use to sort content chronologically. This lessen the impact of old content being published.
However, if you want to stop old content from being published altogether, you will need to use one of the available filter hooks and a little bit of code to do so. Here’s an example (please test this before pushing to your site!):
public function skip_push( $skip, $post_id ) {
// Check if the post has been previously updated.
// If so, we don't need to check this.
// A deleted post will not return an ID,
// but that will short circuit later within the plugin.
$apple_news_id = get_post_meta( $post_id, 'apple_news_api_id', true );
if ( ! empty( $apple_news_id ) ) {
return $skip;
}
// Get the post
$post = get_post( $post_id );
// Compare the publish date to the current date.
// If more than 24 hours, then don't publish.
if ( ( time() - strtotime( $post->post_date ) ) > DAY_IN_SECONDS ) {
// Remove the pending designation if it exists
delete_post_meta( $post_id, 'apple_news_api_pending' );
// Remove the async in progress flag
delete_post_meta( $post_id, 'apple_news_api_async_in_progress' );
// Clear the cache for post status
delete_transient( 'apple_news_post_state_' . $post_id );
// Show an error message
Admin_Apple_Notice::error( __( 'This post is more than 24 hours old and cannot be published to Apple News.', 'your-textdomain' ) );
// Skip publishing
$skip = true;
}
return $skip;
}
add_filter( 'apple_news_skip_push', 'skip_push', 10, 2 );
Auto-publish is not working for me after update to 1.0.8
I can manually push any article or group of articles to apple news.
All articles show as:
Study: Warming giving US type of weather we prefer (id:760364)
Options | Download | Publish
Never N/A Not published
My problem is with scheduled posts, it is not the auto publish:
https://wordpress.org/support/topic/schedule-articles-not-publishing-to-apple-news?replies=2
Sorry, i should have posted there
The issue with scheduled posts was resolved in version 1.1.6