Skip to content

Commit 591686a

Browse files
committed
Add compatible with Magento 2.3.0
1 parent 2c76935 commit 591686a

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

Block/Checkout/Success.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class Success extends Template
2929

3030
protected $order;
3131

32+
protected $templateArray;
33+
3234
/**
3335
* @param Context $context
3436
* @param \MagePal\CheckoutSuccessMiscScript\Helper\Data $helper
@@ -104,9 +106,13 @@ protected function getTemplateArray()
104106
*/
105107
protected function processTemplate($string)
106108
{
107-
$template = $this->getTemplateArray();
109+
if (empty($this->templateArray)) {
110+
$template = $this->getTemplateArray();
111+
112+
$this->templateArray = str_replace(array_keys($template), array_values($template), $string);
113+
}
108114

109-
return str_replace(array_keys($template), array_values($template), $string);
115+
return $this->templateArray;
110116
}
111117

112118
/**
@@ -120,8 +126,7 @@ public function getActiveScripts()
120126

121127
if (is_array($scripts)) {
122128
foreach ($scripts as $script) {
123-
if (
124-
array_key_exists('is_enabled', $script)
129+
if (array_key_exists('is_enabled', $script)
125130
&& $script['is_enabled'] == 'checked'
126131
&& array_key_exists('scripts', $script)
127132
) {

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
"success page js"
1414
],
1515
"require": {
16-
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6|~7.1.0",
17-
"magento/module-backend": "100.0.*|100.1.*|100.2.*",
18-
"magento/framework": "100.0.*|100.1.*|101.0.*"
16+
"php": "~5.6.0|7.0.2|7.0.4|~7.0.6|~7.1.0|~7.1.3|~7.2.0",
17+
"magento/module-backend": "100.0.*|100.1.*|100.2.*|101.0.0",
18+
"magento/framework": "100.0.*|100.1.*|101.0.*|102.0.*"
1919
},
2020
"suggest": {
2121
"magepal/magento2-preview-checkout-success-page":"Preview checkout success page from admin"
2222
},
2323
"type": "magento2-module",
24-
"version": "1.1.4",
24+
"version": "1.1.5",
2525
"license": [
2626
"proprietary"
2727
],

etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<comment>
2222
<![CDATA[
2323
<strong>Copyright © 2018 <a href="http://www.magepal.com" target="_blank">www.magepal.com</a> / <a href="mailto:[email protected]">[email protected]</a></strong><br />
24-
Thanks for choosing MagePal Extensions. Trusted by 1000s of developers worldwide.<br/><br/>
24+
Discovery other must have extensions at <a href="https://www.magepal.com" target="_blank">www.magepal.com</a>. Thanks for choosing MagePal Extensions.<br/><br/>
2525
<hr style="border-top: 1px solid #e3e3e3" />
2626
]]>
2727
</comment>

0 commit comments

Comments
 (0)