0

The following Magento1 code gets me a JSON string of all country regions (states, provinces, cantons, etc.)

Mage::helper('directory')->getRegionJson()

What is the equivalent code in Magento2?

1 Answer 1

1

Figured it out.

$this->get('\Magento\Directory\Helper\Data')->getRegionJson()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.