關閉 WooCommerce 的自動填充帳單資訊功能
如果你使用購物車來做pos系統, 會發生結帳資料會帶出舊值, 這時候只要在function 中寫入代碼就能在每次結帳時輸入新值嘍!

[read more]
程式碼:
// Disable automatic billing information fill
add_filter( ‘woocommerce_checkout_get_value’, ‘disable_autofill_billing_info’, 10, 2 );
function disable_autofill_billing_info( $value, $input ) {
if ( strpos( $input, ‘billing_’ ) !== false ) {
$value = ”;
}
return $value;
}
[/read]
