I am writing a shipping plugin for my Magento 2 store. I need to access the values of the customizable options of my products that are in the cart. For example, Product 1 has customizable options of width and height (NOTE: they are NOT attributes - they are customizable options). I need to programmatically read these values so I can use them in my shipping algorithm. How can I do this?
If you option is set for cart then you can simple follow this code
<?php echo $_item->getOptionByCode('custom')->getValue(); ?>