Remove WooCommerce checkout fields values Remove WooCommerce checkout fields values wordpress wordpress

Remove WooCommerce checkout fields values


You can use Wordpress '__return_empty_string' with woocommerce_checkout_get_value WooCommerce filter hook to get empty values simply this way:

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

This will empty all checkout values, when checkout page is loaded.

The Code goes in functions.php file of your active child theme (or theme) or also in any plugin file.

This code is tested and works.

You should reset all existing sessions in Woocommerce settings > System status > tools and also the cache if your e-commerce use any.
Also empty your browser cache and stored data.

Related: Clear only some checkout fields values in Woocommerce


You can set autocomplete="off" for the form fields using the woocommerce_checkout_fields filter.

    add_filter('woocommerce_checkout_fields', 'autocomplete_off_checkout_fields');    function autocomplete_off_checkout_fields($fields) {          $fields['billing_first_name']['autocomplete'] = 'off';          return $fields;      }    }

This will work on all the woocommerce checkout fields.