Make Phone Number Field Not Required on Checkout in WooCommerce

WooCommerce

WooCommerce is my personal favorite eCommerce plugin for WordPress. It is easy to use and it is very popular, making it easy for anyone to find a theme that they like that uses it. One thing that some people don’t like is that by default on the checkout page, if you are creating an account, the phone number field is required. If you are selling digital products, or cheaper merchandise, you might not want to require that field. Sometimes people don’t like to give out their phone number. Follow these instructions to remove the requirement for the phone field.

Option 1

Step 1

The first option is to to purchase the Checkout Field Editor plugin for WooCommerce for $49.95. If you aren’t comfortable adding code to your site, then that is your best option. Otherwise the second option is to add some code to your WordPress functions.php file, which I will show you below.

Step 2

In WordPress go to “Appearance” and click into “Editor.”

WordPress Appearance Editor

Step 3

On the right hand side we will click into the functions.php file. (I highly recommend backing this file up first via FTP just in case. If you make one mistake you could take your site down)

WordPress Theme Functions

Step 4

We are going to add the following code right before your closing PHP tag.

add_filter( 'woocommerce_billing_fields', 'wc_npr_filter_phone', 10, 1 );

function wc_npr_filter_phone( $address_fields ) {
$address_fields['billing_phone']['required'] = false;
return $address_fields;
}

See screenshot below with example.

WooCommerce Hooks

Step 5

Then click on “Update File”.

Update File

And now the Phone field is now longer required on checkout.

WooCommerce Checkout

Option 2

If you don’t like editing code, you could also purchase the WooCommerce Checkout Field Editor extension.

To read more tutorials on customizing the checkout fields, see this tutorial: Customizing checkout fields using actions and filters.

As always feel free to leave your comments below!

author bio
Brian Jackson

I craft actionable content and develop performance-driven WordPress plugins. Connect on X, subscribe to my newsletter (once a month), or buy me coffee.

15 thoughts on “Make Phone Number Field Not Required on Checkout in WooCommerce”

  1. Thanks for this! I am using the same code to make our email address field not required – but the basic idea is the same.

    Reply
    • Awesome, I should add that to the post as another option :) Definitely can be applied to other fields. Glad it was helpful. Thanks for the comment.

      Reply
  2. We use checkout field editor extension and it works just fine for us, although we could agree that adding just a few lines of code might be a better option because plugins (specially if you have bunch of them installed) slow down the whole site load and increase # of http requests which negatively affect SEO. Anyhow useful tutorial, I am glad I ran into this site!

    Reply
    • Thanks for the suggestion. I have added that to the post as another option. I agree I don’t like installing additional plugins to do small jobs, but some people might feel safer doing it that way.

      Reply
  3. hello and thank you for this
    i need this code for only use digital products but not work
    When our digital product. This field is unnecessary and when the product is essential postal
    thank you for everything

    Reply
  4. Hello….
    would u tell that which key word used for E mail address in checkout field just like “phone” for phone number.

    Reply

Leave a Comment

2