問題描述
我有一個特殊情況,我需要很多人登錄一個專門創建的用戶(一個登錄名和一個密碼)并通過它購買商品.問題是,如果 A 使用此 ONE 用戶憑據登錄并進行購買,他會在運輸/賬單詳細信息中留下痕跡,然后 B 將在結帳頁面看到這些詳細信息.Woocommerce 默認保存這些詳細信息,我怎么能禁用它?我怎樣才能讓 Woocommerce Chechout 頁面總是有空字段,沒有來自以前購買的預填充數據?
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?
謝謝!蝠鲼
推薦答案
you need this filter... 此過濾器旨在覆蓋結帳時顯示的值... 下面將返回空字符串...以清空正在顯示的值.
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..
這篇關于如何讓 Woocommerce 不保存 Checkout 計費字段的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!