X

Make phone number not a required field in wooCommerce

In many cases, you don't need to require the phone number field in WooCommerce. If you add this snippet to the functions.php file of your WordPress theme, it will make the billing phone number field a non-required field.

add_filter( 'woocommerce_billing_fields', 'wps_remove_filter_phone', 10, 1 );
function wps_remove_filter_phone( $address_fields ) {
  $address_fields['billing_phone']['required'] = false;
  return $address_fields;
}

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!