Show the "new settings discover" message only on plugin settings pages

This commit is contained in:
Narek Zakarian 2025-07-14 16:05:26 +04:00
parent b05a2e9150
commit 84e0ad44ab
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -111,7 +111,11 @@ class SettingsModule implements ServiceModule, ExecutableModule {
*/
add_filter(
Repository::NOTICES_FILTER,
static function ( array $notices ): array {
static function ( array $notices ) use ( $container ): array {
if ( ! $container->get( 'wcgateway.is-ppcp-settings-page' ) ) {
return $notices;
}
$message = sprintf(
// translators: %1$s is the URL for the startup guide.
__(