Skip to content

Commit

Permalink
Merge pull request #83 from Codeinwp/fix/notifications-management
Browse files Browse the repository at this point in the history
Fix notifications management
  • Loading branch information
cristian-ungureanu authored Oct 25, 2023
2 parents 3bb4d02 + d217b8a commit 6d24fb1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions inc/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
* Admin class.
*/
class Admin {

/**
* Property to suspend the survey.
* Change it to true to enable it.
*
* @var bool
*/
private $suspend_survey = true;

/**
* Admin constructor.
*/
Expand Down Expand Up @@ -55,6 +64,10 @@ public function setup_otter_notice() {
*/
public function should_show_survey_notice() {

if ( $this->suspend_survey ) {
return false;
}

// Notice was dismissed.
if ( get_option( Constants::CACHE_KEYS['dismissed-survey-notice'], 'no' ) === 'yes' ) {
return false;
Expand Down

0 comments on commit 6d24fb1

Please sign in to comment.