Hello Friends,
In this Magento Tutorial, I will be describing How to Remove Currency Switcher in Magento 2. Before starting, explore the earlier published blog How To Update Product Attributes In Bulk In Magento 2.
Preface:
In Magento 2 the customers can select their local currency for payment from the currency switcher dropdown.
But the user has to manually select their preferred currency. GeoIP Currency Switcher for Magento 2, automatically detects the user’s location and converts the currency accordingly. Thus, eliminating the necessity for manual selection of currency. In this case, there is no need for a currency switcher dropdown in Magento 2.
Let’s get started to know How to Remove Currency Switcher in Magento 2.
Steps to Remove Currency Switcher in Magento 2:
Step 1: Go to the following path
app/design/frontend/Themes/Yourtheme/Magento_Theme/layout/default.xml
And add the below code:
<?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="currency" remove="true" /> <referenceBlock name="store.settings.currency" remove="true" /> </body> </page>
Note: In case you already have file named “default.xml”, you just need to add the below two lines before the closing of </body> tag.
<referenceBlock name="currency" remove="true" /> <referenceBlock name="store.settings.currency" remove="true" />
Step 2: Run the below command to flush the cache.
php bin/magento cache:flush
That’s it!
Conclusion:
This way you can remove the currency switcher in Magento 2. For any difficulty in implementation of the above steps, mention in the comment section below. Be sure to share the article furthermore. Will get back soon with another solution, until then Stay in the know!
Happy Reading!