How to hide custom option data in the cart in Magento 2

Viewed 746

I made a custom option programatically in my cart observer. I want that custom option to be hidden in the cart so that the user can't see it.

   $additionalOptions[] = [
            'label' => 'Product Customize', // hide attributes 
            'value' => $filename
        ];

    if(count($additionalOptions) > 0){
        $item->addOption(array(
            'code' => 'additional_options',
            'value' => serialize($additionalOptions)
        ));
    }
0 Answers
Related