Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Woocommerce not to save Checkout billing fields

I have a particular case where I need many people to login to ONE specially created user (one login name and one password for all) and purchase items through it. The problem is if Person A logins with this ONE user credentials and makes a purchase he will leave a trace in shipping/billing details, person B will then see those details when in checkout page. Woocommerce saves those details by default, how could I disable that? How can I make Woocommerce Chechout page to always have empty fields with no prepopulated data from previous purchases?

Thanks! Mantas

enter image description here

like image 689
Mantas Avatar asked Mar 13 '23 08:03

Mantas


1 Answers

you need this filter... this filter is meant to overwrite the values being displayed at checkout... below will return empty string... to empty the values being displayed.

add_filter('woocommerce_checkout_get_value','__return_empty_string',10);

But this does not mean, these values won't be seen in other places.. like "My Account" page..

like image 200
Reigel Avatar answered Mar 16 '23 03:03

Reigel