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
30
30
31
31
/**
32
32
* @var SessionManagerInterface
33
+ * @deprecated
33
34
*/
34
35
private $ session ;
35
36
@@ -83,19 +84,13 @@ public function processHeaderValue(string $headerValue) : void
83
84
);
84
85
}
85
86
} 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
+ );
99
94
}
100
95
} catch (\Magento \Framework \Exception \NoSuchEntityException $ e ) {
101
96
//skip store not found exception as it will be handled in graphql validation
Original file line number Diff line number Diff line change 16
16
</argument >
17
17
</arguments >
18
18
</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 >
19
24
</config >
You can’t perform that action at this time.
0 commit comments