How to get Order Item Selected Options in Magento 2?

We can get Product selected options in Magento 2 by just simple code snippet, We can get selected options of Bundle, Configurable and Grouped product by below code snippet.

Customer purchased the configurable product with different variant and if you need to get selected variant of Product using Programmatically, Below code is useful to get Configurable and Bundle product selected options.

First, you need to get Item Object from a specific order.
Call below function in PHP file,

In template or PHP file, You have already Order or Quote object for getting all the items of Quote or Order. You can get Order Object by Get Order data by order id

The output will look like,

configurable product selected options
configurable product selected options

One Reply to “How to get Order Item Selected Options in Magento 2?”

Leave a Reply

Your email address will not be published. Required fields are marked *