rrors() { $notification = Models\Notification::getNotificationByName( 'search-console-sitemap-has-errors' ); if ( ! aioseo()->searchStatistics->api->auth->isConnected() || ! aioseo()->internalOptions->searchStatistics->site->verified || 0 === aioseo()->internalOptions->searchStatistics->sitemap->lastFetch || // Not fetched yet. ! aioseo()->searchStatistics->sitemap->getSitemapsWithErrors() ) { if ( $notification->exists() ) { Models\Notification::deleteNotificationByName( 'search-console-sitemap-has-errors' ); } return; } if ( $notification->exists() ) { return; } $lastFetch = aioseo()->internalOptions->searchStatistics->sitemap->lastFetch; $lastFetch = date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $lastFetch ); Models\Notification::addNotification( [ 'slug' => uniqid(), 'notification_name' => 'search-console-sitemap-has-errors', 'title' => __( 'Your sitemap has errors.', 'all-in-one-seo-pack' ), 'content' => sprintf( // Translators: 1 - Last fetch date. __( 'We detected that your sitemap has errors. The last fetch was on %1$s. Click below to resolve this issue.', 'all-in-one-seo-pack' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded $lastFetch ), 'type' => 'warning', 'level' => [ 'all' ], 'button1_label' => __( 'Fix Sitemap Errors', 'all-in-one-seo-pack' ), 'button1_action' => 'https://route#aioseo-sitemaps&open-modal=true:general-sitemap', // phpcs:ignore Generic.Files.LineLength.MaxExceeded 'start' => gmdate( 'Y-m-d H:i:s' ) ] ); } }
Fatal error: Uncaught Error: Class "AIOSEO\Plugin\Common\SearchStatistics\Notices" not found in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/SearchStatistics/SearchStatistics.php:60 Stack trace: #0 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(317): AIOSEO\Plugin\Common\SearchStatistics\SearchStatistics->__construct() #1 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(97): AIOSEO\Plugin\AIOSEO->load() #2 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(76): AIOSEO\Plugin\AIOSEO->init() #3 /htdocs/wp-content/plugins/all-in-one-seo-pack/app/AIOSEO.php(414): AIOSEO\Plugin\AIOSEO::instance() #4 /htdocs/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php(96): aioseo() #5 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #6 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #7 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #8 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #9 /htdocs/index.php(17): require('/htdocs/wp-blog...') #10 {main} thrown in /htdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/SearchStatistics/SearchStatistics.php on line 60