= strtotime('2021-11-24 12:00:00'))
&& !get_transient(self::OPTION_NAME);
if ($shouldDisplay) {
$this->display();
}
}
private function display() {
$subscribers = Subscriber
::whereNull('deleted_at')
->count();
$header = '
' . __('Save big on MailPoet – 40% off this Black Friday', 'mailpoet') . '
';
$body = '' . __('Our biggest ever sale is here! Save 40% on all annual plans and licenses until 8 am UTC, November 30. Terms and conditions apply.', 'mailpoet') . '
';
$link = ""
. __('Shop now', 'mailpoet')
. '
';
$extraClasses = 'mailpoet-dismissible-notice is-dismissible';
WPNotice::displaySuccess($header . $body . $link, $extraClasses, self::OPTION_NAME, false);
}
public function disable() {
WPFunctions::get()->setTransient(self::OPTION_NAME, true, self::DISMISS_NOTICE_TIMEOUT_SECONDS);
}
}