ลบ / ลบรายละเอียดออกจากการชำระเงินใน WooCommerce (รหัสไปรษณีย์ บริษัท โทรศัพท์ …-

Woocommerce este un sistem foarte simplu pentru oricine doreste sa creeze un นิตยสารออนไลน์, avand la baza Wordpress-
La instalarea default, WooCommerce va adauga un formular standard pentru detaliile de facturare. In pagina deCheckouta clientului.
Conceput ca un sistem de นิตยสารออนไลน์ care sa permita atat livrarea unor produse fizice cat si descarcarea unora virtuale, WooCommerce cere in formularul standard o serie de date ale clientului: Nume, Prenume, Numar de telefon, Tara, Adresa, Oras, Cod Postal. Unele dintre aceste campuri nu ne sunt necesare pentru o comanda virtuala de exemplu. Un produs care sa poata fi descarcat sau un produs care a fost platit prin PayPal nu ar avea nevoie de datele pentru livrare. In acest caz este bine sa usuram sistemul de comanda pentru utilizator, prin eliminarea unor campuri din Checkout.

Eliminarea campuluiCod Postaldin WooCommerce Checkout

Sa putem eliminaCodul Postal/ Billing Postcode din WooCommerce, trebuie sa mergem si sa editam fisierul functions.php al temei de WordPress care este activa pe website. In functions.php adaugam liniile:

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
unset($fields['billing']['billing_postcode']);
return $fields;
}

ที่ไหน “billing_postcodeeste campul pentru codul postal. Daca dorim sa eliminam al doilea camp de adresa, vom inlocuibilling_postcode” Cu “billing_address_2”-

 unset($fields['billing']['billing_address_2']);

Sunt situatii in care s-ar putea sa nu intereseze niciun detaliu de plata al clientului. De regula atunci cand plata se face prin PayPal. In acest scenariu putem alege sa eliminam toate campurile din pagina de comanda.

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
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_address_2']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_email']);
unset($fields['billing']['billing_city']);
return $fields;
}

In acest fel veti sterge toate campurile din WooCommerce Checkout.

หลงใหลเกี่ยวกับเทคโนโลยีฉันเขียนด้วยความยินดีกับ stealthsetts.com เริ่มต้นด้วยปี 2549 ฉันมีประสบการณ์มากมายในระบบปฏิบัติการ: MacOS, Windows และ Linux แต่ยังอยู่ในภาษาการเขียนโปรแกรมและแพลตฟอร์มบล็อก (WordPress) และสำหรับร้านค้าออนไลน์ (Woocommerce, Magento, Presashop)

บ้าน แหล่งที่มาของคุณบทเรียนเคล็ดลับและข่าวที่เป็นประโยชน์ ลบ / ลบรายละเอียดออกจากการชำระเงินใน WooCommerce (รหัสไปรษณีย์ บริษัท โทรศัพท์ …-

6 ความคิดเกี่ยวกับ“ลบ / ลบรายละเอียดออกจากการชำระเงินใน WooCommerce (รหัสไปรษณีย์ บริษัท โทรศัพท์ …-”

  1. Bonjour Merci pour ce post !
    J’avais besoin de supprimer le nom de l’entreprise et c’est parfait ça a fonctionné !!
    Je souhaite supprimer également le nom de l’entreprise surexpédier à une adresse différente”-
    mais je ne sais pas par quoi remplacer custom_override_checkout_fields dans votre code. Pourriez vous m’aider ?

    ตอบ
  2. Hi,I added this code to functions.php as guided but my website crashed. It’s totally blank. I’m not totally new to stuff like this but i’m not a pro either.

    If i could access my dashboard, i would just erase it but i cannot access anything on my website at all.

    Please help, what should i do? Urgent response needed please!

    ตอบ
    • สวัสดี,
      Yes, is a good ideea in customizer but in the latest version of Woo I see onlyaddress 2”- “company. For postal code and oher fileds is req functions code to hide.

      ตอบ
แสดงความคิดเห็น