diff --git a/src/WpAdmin/Tracking.php b/src/WpAdmin/Tracking.php index fe242ee..03fe93f 100644 --- a/src/WpAdmin/Tracking.php +++ b/src/WpAdmin/Tracking.php @@ -153,7 +153,9 @@ protected function checkForOptOut(): void } /** - * Display the admin notice to users that have not opted-in or out + * Display the admin notice to users that have not opted-in or out. + * Don't show this notice when _not_ on the Custom Login settings page. + * Don't show this notice when the hide tracking notice has been "saved". */ protected function adminNotice(): void { @@ -161,6 +163,11 @@ protected function adminNotice(): void return; } + // Check the notice setting _after_ settings page check.. + if (!empty(get_option(self::OPTION_HIDE_TRACKING_NOTICE))) { + return; + } + printf( $this->getView(ServiceProvider::WP_UTILITIES_VIEW)->retrieve( 'notices/admin-notice.php',