Get Current Admin User Role id programmatically in Magento 2.

Magento 2 Contains Multiple Users for the admin panel to access different sections of the functionality based on their User Roles.

You can see User Roles in the admin panel by clicking on the left navigation System -> Permissions -> User Roles. Continue reading “Get Current Admin User Role id programmatically in Magento 2.”

Delete Customer Address by address id Programmatically Magento 2.

You can delete the specific customer address by address id using the AddressRepositoryInterface interface.

Magento\Customer\Api\AddressRepositoryInterface contains the deleteById($addressId) function with pass first argument as address id to fetch specific customer address data. Continue reading “Delete Customer Address by address id Programmatically Magento 2.”

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. Continue reading “Get Customer Address data by address id in Magento 2.”