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.