File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
app/code/Magento/DirectoryGraphQl Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class CurrencyProcessor implements HttpHeaderProcessorInterface
3030
3131 /**
3232 * @var SessionManagerInterface
33+ * @deprecated
3334 */
3435 private $ session ;
3536
@@ -83,19 +84,13 @@ public function processHeaderValue(string $headerValue) : void
8384 );
8485 }
8586 } else {
86- if ($ this ->session ->getCurrencyCode ()) {
87- /** @var \Magento\Store\Model\Store $currentStore */
88- $ currentStore = $ this ->storeManager ->getStore () ?? $ this ->storeManager ->getDefaultStoreView ();
89- $ currentStore ->setCurrentCurrencyCode ($ this ->session ->getCurrencyCode ());
90- } else {
91- /** @var \Magento\Store\Model\Store $store */
92- $ store = $ this ->storeManager ->getStore () ?? $ this ->storeManager ->getDefaultStoreView ();
93- $ this ->httpContext ->setValue (
94- HttpContext::CONTEXT_CURRENCY ,
95- $ store ->getCurrentCurrency ()->getCode (),
96- $ store ->getDefaultCurrency ()->getCode ()
97- );
98- }
87+ /** @var \Magento\Store\Model\Store $store */
88+ $ store = $ this ->storeManager ->getStore () ?? $ this ->storeManager ->getDefaultStoreView ();
89+ $ this ->httpContext ->setValue (
90+ HttpContext::CONTEXT_CURRENCY ,
91+ $ store ->getCurrentCurrency ()->getCode (),
92+ $ store ->getDefaultCurrency ()->getCode ()
93+ );
9994 }
10095 } catch (\Magento \Framework \Exception \NoSuchEntityException $ e ) {
10196 //skip store not found exception as it will be handled in graphql validation
Original file line number Diff line number Diff line change 1616 </argument >
1717 </arguments >
1818 </type >
19+ <type name =" Magento\DirectoryGraphQl\Controller\HttpHeaderProcessor\CurrencyProcessor" >
20+ <arguments >
21+ <argument name =" session" xsi : type =" object" >Magento\Framework\Session\Generic\Proxy</argument >
22+ </arguments >
23+ </type >
1924</config >
You can’t perform that action at this time.
0 commit comments