Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/WpAdmin/Tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,21 @@ 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
{
if (!isSettingsPage($this->getPlugin())) {
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',
Expand Down