Chèn code vào file function.php
Thêm đoạn code sau vào file function.php
Muốn xóa trường thông tin nào thì bạn copy thêm 1 dòng: unset($fields['billing']['billing_state']); và thay đổi giá trị billing_state thành cái trường theo dưới đây:
Mục Thanh toán (Billing): billing
Thêm đoạn code sau vào file function.php
Mã:
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
unset($fields['billing']['billing_state']);
return $fields;
}
Mục Thanh toán (Billing): billing
- Họ ( First Name): billing_first_name
- Tên (Last Name): billing_last_name
- Tên công ty (Company Name): billing_company
- Địa chỉ (Address): billing_address_1
- Địa chỉ 2: billing_address_2
- Tỉnh/Thành phố (Town/City): billing_city
- Mã bưu điện (Postcode): billing_postcode
- Quốc gia (Country): billing_country
- Bang/Hạt (State): billing_state
- Địa chỉ email (Email Address): billing_email
- Số điện thoại (Phone): billing_phone
- Họ ( First Name): billing_first_name
- Tên (Last Name): billing_last_name
- Tên công ty (Company Name): billing_company
- Địa chỉ (Address): billing_address_1
- Địa chỉ 2: billing_address_2
- Tỉnh/Thành phố (Town/City): billing_city
- Mã bưu điện (Postcode): billing_postcode
- Quốc gia (Country): billing_country
- Bang/Hạt (State): billing_state
- Ô thêm ghi chú: order_comments