Remove WooCommerce checkout fields values

前端 未结 1 1586
一生所求
一生所求 2021-01-12 08:28

I\'m trying to apply autocomplete=\"off\" on my WooCommerce checkout fields but it just doesn\'t work.

Is there a way to do that for the checkout form?

相关标签:
1条回答
  • 2021-01-12 08:47

    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

    0 讨论(0)
提交回复
热议问题