For at fjerne felter på kassen til woocommerce shop skal du bruge hook: woocommerce_checkout_fields
Som et eksempel skal du slippe næste kode i dit aktuelle WordPress-temafil functions.php:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | add_filter('woocommerce_checkout_fields', function ($fields) { //unset($fields['billing']['billing_first_name']); //unset($fields['billing']['billing_last_name']); unset($fields['billing']['billing_company']); unset($fields['billing']['billing_address_1']); unset($fields['billing']['billing_address_2']); unset($fields['billing']['billing_city']); unset($fields['billing']['billing_postcode']); unset($fields['billing']['billing_country']); unset($fields['billing']['billing_state']); unset($fields['billing']['billing_phone']); //unset($fields['order']['order_comments']); //unset($fields['billing']['billing_email']); //unset($fields['account']['account_username']); //unset($fields['account']['account_password']); //unset($fields['account']['account_password-2']); return $fields; }); |
Se feltnøgler, du kan deaktivere:
Faktureringsfelter
- faktureringsnavn
- faktureringsefternavn
- fakturering_firma
- faktureringsland
- faktureringsadresse_1
- faktureringsadresse_2
- faktureringsby
- faktureringsstat
- faktureringspostnummer
- faktureringstelefon
- fakturerings-e-mail
Forsendelsesfelter
- forsendelsesnavn
- shipping_last_name
- fragtfirma
- shipping_country
- forsendelsesadresse_1
- forsendelsesadresse_2
- shipping_city
- shipping_state
- forsendelsespostnummer
Kontofelter
- konto_brugernavn
- konto_adgangskode
Bestil felter
- ordrekommentarer
