Make the phone number optional at checkout
The billing phone field stays at checkout but customers can leave it empty.
<?php
add_filter(
'woocommerce_billing_fields',
static function ( $fields ) {
if ( isset( $fields['billing_phone'] ) ) {
$fields['billing_phone']['required'] = false;
}
return $fields;
},
20
);
Good to know
For the classic checkout. In the block checkout, set “Phone” to optional in the Checkout block’s settings.
In these packs
- WooCommerce: cart and checkout: Free-shipping progress, coupon links, quantity limits and a cleaner checkout.