Get Rma Attribute Options By Attribute Code Magento 2.

You can get all the RMA attribute options by RMA attribute code using Magento 2.

Native Magento Commerce RMA contains the four attribute code.

  • resolution
  • condition
  • reason
  • reason_other

You need to fetch all the attribute options of specific RMA attribute code, You can get the id and value of the option using the below code snippet,

You need to use Magento\Eav\Api\AttributeOptionManagementInterface interface to fetch all the options.

We will fetch all the options of condition attribute code.
We have to pass attribute code to fetch all the attribute options of RMA attribute code.

Call function using the below way,


Where 7 is the option_id and unopened is the option’s value.