問題描述
我有一個(gè)特殊情況,我需要很多人登錄一個(gè)專門創(chuàng)建的用戶(一個(gè)登錄名和一個(gè)密碼)并通過它購買商品.問題是,如果 A 使用此 ONE 用戶憑據(jù)登錄并進(jìn)行購買,他會(huì)在運(yùn)輸/賬單詳細(xì)信息中留下痕跡,然后 B 將在結(jié)帳頁面看到這些詳細(xì)信息.Woocommerce 默認(rèn)保存這些詳細(xì)信息,我怎么能禁用它?我怎樣才能讓 Woocommerce Chechout 頁面總是有空字段,沒有來自以前購買的預(yù)填充數(shù)據(jù)?
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... 此過濾器旨在覆蓋結(jié)帳時(shí)顯示的值... 下面將返回空字符串...以清空正在顯示的值.
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);
但這并不意味著,這些值不會(huì)在其他地方看到..比如我的帳戶"頁面..
But this does not mean, these values won't be seen in other places.. like "My Account" page..
這篇關(guān)于如何讓 Woocommerce 不保存 Checkout 計(jì)費(fèi)字段的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!