The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Snippet · PHP

Make Phone Number Mandatory at WooCommerce Checkout

Shared by Kamran Abdul Aziz · May 20, 2026 · @woocommerce_checkout_fields

10 copies
275 views
2 upvotes
Back to Snippets

By default, the phone number field at WooCommerce checkout is optional. This snippet forces it to be required, so customers cannot complete an order without entering a valid phone number. Useful for store owners who need contact details for order follow-up or delivery coordination.

<?php

add_filter( 'woocommerce_checkout_fields', function( $fields ) {

	$fields['billing']['billing_phone']['required'] = true;

	$fields['billing']['billing_phone']['class']    = array( 'form-row-wide', 'validate-required', 'validate-phone' );

	$fields['billing']['billing_phone']['label']    = 'Phone';

	return $fields;

}, 9999 );
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments

Proudly supported by