How To Get Region ID By Region & Country Code In Magento 2

How To Get Region ID By Region & Country Code In Magento 2

Magento 2 store owners implement various tactics based on different conditions to maximize profits.

For example, a store owner can offer discounts on shipping to certain regions.

However, to implement this condition, the developer needs to get region ID by region & country code in Magento 2. The below code shows how to do so.

Another scenario where this solution can be useful is when the customer address is to be collected.

Method To Get Region ID By Region & Country Code In Magento 2:

That’s it.

Any doubts in the above code? Please feel free to mention them in the Comments section below. I’d try to help you out asap.

Do share the solution with Magento developers out there via social media.

Thank you.

5
(based on 2 Reviews)

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

Leave a reply:

Your email address will not be published.

SUBSCRIBE
3.8
(based on 5 Reviews)