I want to enable/disable the COD payment method based on product attribute. I tried this:
Disable Payment Method at Checkout in Magento 2 Based on Product Attribute
But I am having an issue when I have 2 products in cart where, cod value of one product is set to “yes” and another one set to “no”.
Any help will be appreciated.