在帐单地址 woocommerce 处添加新字段 [英] Add new fields at the billing address woocommerce
本文介绍了在帐单地址 woocommerce 处添加新字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的网站上编辑我的帐单邮寄地址,我需要在我的帐户页面中添加和删除一些其他地址,我应该编辑哪些代码?
I want to edit my billing address at my website, where i need to add and delete some others in my account page, which code shall I edit?
先谢谢你
推荐答案
删除现有字段,例如国家/地区:
To delete an existing field, country for example:
add_filter( 'woocommerce_billing_fields' , 'custom_override_billing_fields' );
function custom_override_billing_fields( $fields ) {
unset($fields['billing_country']);
return $fields;
}
这篇关于在帐单地址 woocommerce 处添加新字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文