billing fields – WordPress Guidance for Beginner's https://phpyouth.com/blog One Stop Web & App Solutions Mon, 12 Aug 2019 11:52:19 +0000 en-US hourly 1 126607587 How to Remove WooCommerce Billing Fields https://phpyouth.com/blog/remove-woocommerce-billing-fields https://phpyouth.com/blog/remove-woocommerce-billing-fields#respond Thu, 08 Aug 2019 10:15:09 +0000 https://phpyouth.com/blog/?p=5041 Hello friends, Good Morning. Today we are going to learn a WooCommerce trick. This trick is about How to remove WooCommerce billing fields. I want to tell you that WooCommerce is a very powerful WordPress tool which converts simple website into an E-commerce one. Nowadays if we go through the stat,  WooCommerce has 73,299,254 downloads […]

The post How to Remove WooCommerce Billing Fields appeared first on Wordpress Guidance for Beginner's.

]]>
Hello friends, Good Morning. Today we are going to learn a WooCommerce trick. This trick is about How to remove WooCommerce billing fields. I want to tell you that WooCommerce is a very powerful WordPress tool which converts simple website into an E-commerce one. Nowadays if we go through the stat,  WooCommerce has 73,299,254 downloads and if we talk about percentage, WooCommerce powered 28% on all Online Store.

WooCommerce, the most customizable eCommerce plateform for building your online business.

A few days back, One of my friends asks me a question regarding WooCommerce that how to remove the billing field from the checkout page. He didn’t mention any field but today we will show how to remove WooCommerce billing fields. So, let’s start

There are two ways to remove WooCommerce billing fields on the checkout page, below they are:

  1. Add the below snippet to the functions.php file of your website active theme.
  2. Install WooCommerce Checkout Field Editor plugin for more customization.

Adding below snippet will risky if you do directly from the WordPress Dashboard. We highly recommended you to do this from either FileZilla(File Transfer Protocol) or through cPanel. What you have to do this to Login Cpanel or Connect FTP, Open wp-contents folder >> Themes >> theme name Child >> functions.php. Here is the snippet to remove WooCommerce billing fields.

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_woofields' );
function custom_override_checkout_woofields( $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_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;
}

Here is another example if you want to remove any specific billing field, let suppose Company Name then your snippet would look like this:

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

So friends, finally a few lines of code and you can easily remove any WooCommerce billing field from the checkout page.

Friends, if this WooCommerce tip&trick helps you then please let me know in the comment box and please don’t forget to share this, Keep learning.

Share and Enjoy !

0Shares
0 0

The post How to Remove WooCommerce Billing Fields appeared first on Wordpress Guidance for Beginner's.

]]>
https://phpyouth.com/blog/remove-woocommerce-billing-fields/feed 0 5041