Move all premium & plan upgrade info to root layout, remove duplicities

[MAILPOET-4416]
This commit is contained in:
Jan Jakes
2022-08-10 14:44:14 +02:00
committed by Veljko V
parent 558d709a18
commit 5c08d22736
17 changed files with 82 additions and 226 deletions

View File

@@ -9,7 +9,6 @@ use MailPoet\Segments\SegmentsRepository;
use MailPoet\Settings\SettingsController;
use MailPoet\Settings\UserFlagsController;
use MailPoet\Util\Installation;
use MailPoet\Util\License\License;
use MailPoet\WP\Functions as WPFunctions;
class Forms {
@@ -73,7 +72,6 @@ class Forms {
if ($this->userFlags->get('display_new_form_editor_nps_survey')) {
$data['current_wp_user'] = $this->wp->wpGetCurrentUser()->to_array();
$data['site_url'] = $this->wp->siteUrl();
$data['premium_plugin_active'] = License::getLicense();
$data['current_wp_user_firstname'] = $this->wp->wpGetCurrentUser()->user_firstname;
$installedAtDiff = (new \DateTime($this->settings->get('installed_at')))->diff(new \DateTime());
$data['installed_days_ago'] = (int)$installedAtDiff->format('%a');