Hello Magento Friends,

Today I will be discussing on How to Remove/Disable Custom Free Shipping Method from Front-end only in Magento 2?

Many times, you do not want to provide a free shipping method to your customers. But the orders placed from the admin grid should have a free shipping method. At that time, Magento store merchants come across the requirement to disable or remove the free shipping method from the store frontend only.

So, let’s find out How to Remove/Disable Custom Free Shipping Method from Front-end only in Magento 2?

Steps to Remove/Disable Custom Free Shipping Method from Front-end only in Magento 2:

Step 1: Go to the below path,

app\code\Vendor\Extension\etc\di.xml

And add this code,

Step 2: Now, go to the below path,

app\code\Vendor\Extension\Plugin\DisableEnableCustomShipping.php

And finally, add the code as mentioned below:

Conclusion:

Hence, with the help of the above code, you can easily Remove/Disable Custom Free Shipping Method from Front-end only in Magento 2. If you have any difficulty, mention it in the comment section. Do share the article further. See you soon till then stay in touch!

Happy Coding!

[Total: 3   Average: 5/5]