Skip to main content
1 of 2
sreelakshmi
  • 386
  • 2
  • 16

Hiding Shipping Method for current Logged in/Guest user if a condition method

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

sreelakshmi
  • 386
  • 2
  • 16