In WooCommerce I’d like to be able to hide the Billing Address fields when Cash on Delivery is chosen since there is no need to fill out the address. But if the customer chooses credit card, the billing address should appear.
I really have no idea where to start with this so I don’t have any code.
2
Answers
I was able to expand a little on the code above...
Hide billing address if COD or show if Credit Card
Firstly billing address is a required filed for woo commerce so, even though you hide them it will not allow you to checkout. So first you need to make it “not required” it can be done using hooks
Make checkout addresses fields not required in WooCommerce
Then you can run the query