I'm using Magento 2.1. Currently, I'm having two shipping methods. One is UPS and another is Flatrate. If my product's attribute returns true, I want to hide Flatrate shipping method from frontend only, for Logged in/Guest User and if the product's attribute returns false I have to hide the UPS shipping method. How can I write the code for the same in my custom module.
Please help...
Thanks In Advance