How to get default country code from store in Magento 2?

N. Gelashvili
Jun 23, 2021

In Magento 2 for every store we have ability to set default country. We can do it from Admin -> Stores -> Configuration ->General -> General

Here we have set Germany for DEREGIONWEBSITE store. Question is how to get this country code in Magento 2 programmatically?

Here is an example how can you achieve this in Magento 2.

--

--