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.
There is a very simple way:
Free Shipping
in "Enable for shipping methods" option field: