Auto enable free shipping for Cash on delivery payment method in WooCommerce

3.3k views Asked by At

How do I Remove Shipping Charges from Cart when Cash on Delivery (COD) is selected and Add Shipping Charges to Cart if Stripe (Credit Card) is selected in woocommerce?

For Example, shipping to Canada costs $4.

If Cash on delivery (COD) is selected in payment options, I want to offer "free shipping" and remove shipping section from the cart but if credit cart payment option is selected in payment gateway by the buyer I want to add those shipping charges based on shipping rates set in shipping classes.

1

There are 1 answers

0
LoicTheAztec On BEST ANSWER

There is a very simple way:

  • Go in WooCommerce Settings > Checkout > Cash on delivery.
  • Add Free Shipping in "Enable for shipping methods" option field:

enter image description here

Now Free shipping will be enabled when Cash on delivery is selected.