I want to get the country code of my website user so that I can show and hide some blocks in my code. How may I do that? For example if someone is browsing our website from Australia I should get AU.
I think there must be some code in Magento to know the country's location. If this feature is not out of the box in Magento then what is the purpose of having allow specific countries in almost every configuration? And how does allow specific countries work?