When you have Virtual or Download Products then there’s no need for the Customer (after paying) to enter their Home Address/etc details.
Use Code Snippets and some simple code to remove the Checkout Fields.
We love to create – share – respond – and deliver.
🧐 Learn with our Mastery Modules: https://websquadron.co.uk/web-design-mastery/
👕 Get our Merchandise: https://websquadron.co.uk/merchandise
😃 Join our Facebook Group: https://www.facebook.com/groups/3309523509284305
😃 Get Code Snippets Pro: https://r.freemius.com/10565/3304295/
😃 Get Elementor Pro: https://trk.elementor.com/25741
😃 Boost your YouTube Analysis: https://www.tubebuddy.com/websquadron
🥹 Support us: https://paypal.me/Websquadron
Hire us to work on your Website!
💌 info@websquadron.co.uk
👩💻 Visit https://websquadron.co.uk
source
@YoEnLinea8456
I understand, so useful, but i want to show custom information. Specifically, the product vendor information. I mean, Name, company name and phone number… Someone can help me?
@roory21
Great tutorial, thank you Imran!
@thejameswilson
I have tried so many methods to remove checkout fields, none of them work, including this method. I am using WordPress 8.4 – I have no idea what I'm doing wrong but I've tried so many different checkout field remover plugins, tried pasting in PHP to my themes function.php, I've tried this video method, but my checkout shows all the fields still. I wish someone could help
@cyybot
add_filter( 'woocommerce_checkout_fields', 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
// Desactivar campos de dirección de envío
unset($fields['shipping']['shipping_first_name']);
unset($fields['shipping']['shipping_last_name']);
unset($fields['shipping']['shipping_company']);
unset($fields['shipping']['shipping_country']);
unset($fields['shipping']['shipping_address_1']);
unset($fields['shipping']['shipping_address_2']);
unset($fields['shipping']['shipping_city']);
unset($fields['shipping']['shipping_state']);
unset($fields['shipping']['shipping_postcode']);
// Desactivar campos de dirección de facturación
/* unset($fields['billing']['billing_first_name']); */
/* unset($fields['billing']['billing_last_name']); */
unset($fields['billing']['billing_company']);
/* unset($fields['billing']['billing_country']); */
unset($fields['billing']['billing_address_1']);
unset($fields['billing']['billing_address_2']);
unset($fields['billing']['billing_city']);
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_postcode']);
return $fields;
}
// Removes Order Notes Title – Additional Information & Notes Field
add_filter( 'woocommerce_enable_order_notes_field', '__return_false', 9999 );
// Remove Order Notes Field
add_filter( 'woocommerce_checkout_fields', 'remove_order_notes' );
function remove_order_notes( $fields ) {
unset($fields['order']['order_comments']);
return $fields;
}
@herrk2352
Du bist der Beste!
@kimlakshman8604
The code link should include line numbers so that it maintains the correct order when you copy and paste it into the snippet plugin.
@imadessarhani645
// WooCommerce: The Code Below Removes Checkout Fields
add_filter( 'woocommerce_checkout_fields', 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $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['billing']['billing_email'] );
// unset( $fields['account']['account_username'] );
// unset( $fields['account']['account_password'] );
// unset( $fields['account']['account_password-2'] );
// Removes Order Notes Title – Additional Information & Notes Field
add_filter( 'woocommerce_enable_order_notes_field', '__return_false', 9999 );
// Remove Order Notes Field
unset( $fields['order']['order_comments'] );
return $fields;
}
@NFGNurtureForGrowth
I have never seen a tutorial so direct and straight to the point like yours! ❤ Thank you soo much, this made things a lot easier
@yassiryassir5080
Please. How to hide all fields (your order :product – subtotal – total) from checkout page
@cryptonewstoday5469
it doesn't work, I get error everytime. ..
@danygingras7782
thanks for this tutorial 🙂