How do I clear a specfic checkout fields in WooCommerce after placing an order?
For example Billing email
and Billing Phone
. So that when the registered customer makes his/her next order, he/she has to fill that fields again?
I see this code, but this clean all the fields, i need only a specific field. Any advice?
add_filter('woocommerce_checkout_get_value','__return_empty_string',10);
2
Answers
You could probably achieve this with some custom javascript:
Or jQuery:
The
woocommerce_checkout_get_value
hook has 2 arguments:$value
argument that is returned$input
argument to target checkout field(s)So in your case, you get: