Remove upgrade offer

[MAILPOET-3641]
This commit is contained in:
Pavel Dohnal
2021-06-02 15:02:12 +02:00
committed by Veljko V
parent 5bfec6377d
commit b97cb1c3de
2 changed files with 3 additions and 8 deletions

View File

@@ -22,17 +22,12 @@ class PHPVersionWarnings {
} }
public function display($phpVersion) { public function display($phpVersion) {
$errorString = __('Your website is running on PHP %s which MailPoet does not officially support. Read our [link]simple PHP upgrade guide[/link] or let MailPoets support team upgrade it for you.', 'mailpoet'); $errorString = __('Your website is running on PHP %s which MailPoet does not officially support. Read our [link]simple PHP upgrade guide.[/link]', 'mailpoet');
$errorString = sprintf($errorString, $phpVersion); $errorString = sprintf($errorString, $phpVersion);
$getInTouchString = __('[link]Yes, I want MailPoet to help me upgrade for free[/link]', 'mailpoet');
$error = Helpers::replaceLinkTags($errorString, 'https://kb.mailpoet.com/article/251-upgrading-the-websites-php-version', [ $error = Helpers::replaceLinkTags($errorString, 'https://kb.mailpoet.com/article/251-upgrading-the-websites-php-version', [
'target' => '_blank', 'target' => '_blank',
'data-beacon-article' => '5ad5f8982c7d3a0e93676666', 'data-beacon-article' => '5ad5f8982c7d3a0e93676666',
]); ]);
$error .= '<br><br>' . Helpers::replaceLinkTags($getInTouchString, 'https://www.mailpoet.com/let-us-handle-your-php-upgrade/', [
'target' => '_blank',
'class' => 'button',
]);
$extraClasses = 'mailpoet-dismissible-notice is-dismissible'; $extraClasses = 'mailpoet-dismissible-notice is-dismissible';

View File

@@ -36,13 +36,13 @@ class PHPVersionWarningsTest extends \MailPoetTest {
public function testItPrintsWarningFor70() { public function testItPrintsWarningFor70() {
$warning = $this->phpVersionWarning->init('7.0.0', true); $warning = $this->phpVersionWarning->init('7.0.0', true);
expect($warning->getMessage())->stringContainsString('Your website is running on PHP 7.0.0'); expect($warning->getMessage())->stringContainsString('Your website is running on PHP 7.0.0');
expect($warning->getMessage())->stringContainsString('https://www.mailpoet.com/let-us-handle-your-php-upgrade/'); expect($warning->getMessage())->stringContainsString('https://kb.mailpoet.com/article/251-upgrading-the-websites-php-version');
} }
public function testItPrintsWarningFor71() { public function testItPrintsWarningFor71() {
$warning = $this->phpVersionWarning->init('7.1.0', true); $warning = $this->phpVersionWarning->init('7.1.0', true);
expect($warning->getMessage())->stringContainsString('Your website is running on PHP 7.1.0'); expect($warning->getMessage())->stringContainsString('Your website is running on PHP 7.1.0');
expect($warning->getMessage())->stringContainsString('https://www.mailpoet.com/let-us-handle-your-php-upgrade/'); expect($warning->getMessage())->stringContainsString('https://kb.mailpoet.com/article/251-upgrading-the-websites-php-version');
} }
public function testItPrintsNoWarningFor72() { public function testItPrintsNoWarningFor72() {