File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ class Success extends Template
29
29
30
30
protected $ order ;
31
31
32
+ protected $ templateArray ;
33
+
32
34
/**
33
35
* @param Context $context
34
36
* @param \MagePal\CheckoutSuccessMiscScript\Helper\Data $helper
@@ -104,9 +106,13 @@ protected function getTemplateArray()
104
106
*/
105
107
protected function processTemplate ($ string )
106
108
{
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
+ }
108
114
109
- return str_replace ( array_keys ( $ template ), array_values ( $ template ), $ string ) ;
115
+ return $ this -> templateArray ;
110
116
}
111
117
112
118
/**
@@ -120,8 +126,7 @@ public function getActiveScripts()
120
126
121
127
if (is_array ($ scripts )) {
122
128
foreach ($ scripts as $ script ) {
123
- if (
124
- array_key_exists ('is_enabled ' , $ script )
129
+ if (array_key_exists ('is_enabled ' , $ script )
125
130
&& $ script ['is_enabled ' ] == 'checked '
126
131
&& array_key_exists ('scripts ' , $ script )
127
132
) {
Original file line number Diff line number Diff line change 13
13
" success page js"
14
14
],
15
15
"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.* "
19
19
},
20
20
"suggest" : {
21
21
"magepal/magento2-preview-checkout-success-page" :" Preview checkout success page from admin"
22
22
},
23
23
"type" : " magento2-module" ,
24
- "version" : " 1.1.4 " ,
24
+ "version" : " 1.1.5 " ,
25
25
"license" : [
26
26
" proprietary"
27
27
],
Original file line number Diff line number Diff line change 21
21
<comment >
22
22
<![CDATA[
23
23
<strong>Copyright © 2018 <a href="http://www.magepal.com" target="_blank">www.magepal.com</a> / <a href="mailto:support@magepal.com">support@magepal.com</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/>
25
25
<hr style="border-top: 1px solid #e3e3e3" />
26
26
]]>
27
27
</comment >
You can’t perform that action at this time.
0 commit comments