= strtotime('2020-11-23 12:00:00'))
&& !get_transient(self::OPTION_NAME);
if ($shouldDisplay) {
$this->display();
}
}
private function display() {
$subscribers = Subscriber
::whereNull('deleted_at')
->count();
$header = '
' . __('MailPoet Black Friday: 33% discount on all our plans!', 'mailpoet') . '
';
$body = '' . __('Signup to a yearly plan today and get 4 months for free.', 'mailpoet') . '
';
$link = ""
. __('Buy 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);
}
}