Show only free shipping in dokan

Hiding other shipping methods when FREE SHIPPING is available in Dokan Multivendor

Shipping is one of the main functionalities of any marketplace/e-commerce website. When you are selling online, you might be thinking of providing free shipping to your customer depending on their purchase amount.

This post is for those users who already have a marketplace and know how WooCommerce and Dokan shipping works. Each vendor can configure their own shipping for the zone which has been selected by the admin. They will be able to offer free shipping and Flat Shipping rate.

Analysing the problem

When a vendor is configuring their shipping they added two shipping method for the selected zone.

  1. Flat Rate – 20 USD (Ex.)
  2. Free shipping – (If purchase amount is 120 USD)

Vendor is expecting to show Flat rate only when the customer is purchasing less than 120 USD and to show only FREE SHIPPING when the order amount is 120 USD.

DARRRRNNNN!!!!!

Its not working as you are expecting. It is showing both Flat Rate and Free shipping when the order amount is 120 USD which is not a good experience for the customer.

You might have added a code snippet from WooCommerce.com documentation but that won’t work for Dokan.

How to solve?

I was thinking of a solution but could not find any. After that, I found a solution and my friend Alamgir helped me with the code.

Now, open your child-theme/functions.php file and paste the below code –

After saving the code, you will be happy, and don’t forget to subscribe to my youtube channel.

Only Free Shipping is showing

Now, only free shipping is showing when the customer is purchasing from a certain amount. This will work for multiple vendors at the same time.

If this blog was helpful then share to your social channel.

Full Video Tutorial

Share This Post

Share on facebook
Share on twitter
Share on linkedin

Related Post

3 thoughts on “Hiding other shipping methods when FREE SHIPPING is available in Dokan Multivendor

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: