Get Customer Address data by address id in Magento 2.

You can get the customer address data by Address id using AddressRepositoryInterface interface.

Magento\Customer\Api\AddressRepositoryInterface contains the getById($addressId) function with pass first argument as address id to fetch specific customer address data.

Get Post data or Params Data in after plugin magento 2.

You can get Post Data value in the After plugin using Magento 2.

You can get all the Params() data after the plugin which is sent by request. If you send the query string Or data within the URL, you can get those data using getParams() in the after plugin.

Get Region Code by Region name in Magento 2.

Magento 2 You can get Region Code by Region name using Directory Module.

You can get region code from region name by Magento\Directory\Model\ResourceModel\Region\CollectionFactory object.

Let’s check with Region name is California and we want to get region code CA from California.