* Add a notice if the local business is enabled, but the schema is set to "Person". * * @since 4.0.0 * * @return void */ private function newsPublicationName() { $notification = Models\Notification::getNotificationByName( 'news-publication-name' ); $addon = aioseo()->addons->getAddon( 'aioseo-news-sitemap' ); $publicationName = aioseo()->options->sitemap->news->publicationName; $blogName = get_bloginfo( 'name' ); if ( ! empty( $publicationName ) || ! empty( $blogName ) || ! $addon->isActive || ! aioseo()->license->isActive() || $addon->requiresUpgrade ) { if ( $notification->exists() ) { Models\Notification::deleteNotificationByName( 'news-publication-name' ); } return; } if ( $notification->exists() ) { return; } Models\Notification::addNotification( [ 'slug' => uniqid(), 'notification_name' => 'news-publication-name', 'title' => __( 'News Sitemap Publication Name', 'aioseo-pro' ), 'content' => sprintf( // Translators: 1 - The plugin short name ("AIOSEO"). __( 'You have not set the Google News Publication Name or the Site Title. %1$s requires at least one of these for the Google News sitemap to be valid.', 'aioseo-pro' ), AIOSEO_PLUGIN_SHORT_NAME ), 'type' => 'error', 'level' => [ 'pro' ], 'button1_label' => __( 'Fix Now', 'aioseo-pro' ), 'button1_action' => 'http://route#aioseo-sitemaps&aioseo-scroll=news-sitemap-publication-name&aioseo-highlight=news-sitemap-publication-name:news-sitemap', 'button2_label' => __( 'Remind Me Later', 'aioseo-pro' ), 'button2_action' => 'http://action#notification/news-publication-name-reminder', 'start' => gmdate( 'Y-m-d H:i:s' ) ] ); } /** * Add a notice if WooCommerce is detected and not licensed or running Lite. * * @since 4.0.0 * * @return void */ private function wooUpsellNotice() { $notification = Models\Notification::getNotificationByName( 'woo-upsell' ); if ( ! class_exists( 'WooCommerce' ) || aioseo()->license->isActive() ) { if ( $notification->exists() ) { Models\Notification::deleteNotificationByName( 'woo-upsell' ); } return; } if ( $notification->exists() ) { return; } Models\Notification::addNotification( [ 'slug' => uniqid(), 'notification_name' => 'woo-upsell', // Translators: 1 - "WooCommerce". 'title' => sprintf( __( 'Advanced %1$s Support', 'aioseo-pro' ), 'WooCommerce' ), // Translators: 1 - "WooCommerce", 2 - The plugin short name ("AIOSEO"). 'content' => sprintf( __( 'We have detected you are running %1$s. Upgrade to %2$s to unlock our advanced eCommerce SEO features, including SEO for Product Categories and more.', 'aioseo-pro' ), 'WooCommerce', AIOSEO_PLUGIN_SHORT_NAME . ' Pro' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded 'type' => 'info', 'level' => [ 'all' ], // Translators: 1 - "Pro". 'button1_label' => sprintf( __( 'Upgrade to %1$s', 'aioseo-pro' ), 'Pro' ), 'button1_action' => html_entity_decode( aioseo()->helpers->utmUrl( AIOSEO_MARKETING_URL . 'pricing/', 'woo-notification-upsell-unlicensed' ) ), 'start' => gmdate( 'Y-m-d H:i:s' ) ] ); } }