Skip to content

Commit fb89a1d

Browse files
committed
ACP2E-2021: Unable to switch to the second store in the front end
- Fixed the static test failure.
1 parent 315aca4 commit fb89a1d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66

77
/** @var \Magento\Customer\Block\CustomerData $block */
8+
/** @var \Magento\Framework\Json\Helper\Data $jsonHelper */
9+
$jsonHelper = $block->getData('jsonHelper');
810

911
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundHelper
1012
?>
@@ -14,8 +16,7 @@
1416
"Magento_Customer/js/customer-data": {
1517
"sectionLoadUrl": "<?= $block->escapeJs($block->getCustomerDataUrl('customer/section/load')) ?>",
1618
"expirableSectionLifetime": <?= (int)$block->getExpirableSectionLifetime() ?>,
17-
"expirableSectionNames": <?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)
18-
->jsonEncode($block->getExpirableSectionNames()) ?>,
19+
"expirableSectionNames": <?= /* @noEscape */ $jsonHelper->jsonEncode($block->getExpirableSectionNames()) ?>,
1920
"cookieLifeTime": "<?= $block->escapeJs($block->getCookieLifeTime()) ?>",
2021
"updateSessionUrl": "<?= $block->escapeJs(
2122
$block->getCustomerDataUrl('customer/account/updateSession')

0 commit comments

Comments
 (0)