diff --git a/includes/class-wc-countries.php b/includes/class-wc-countries.php index ebed1241232..2b44981f0ab 100644 --- a/includes/class-wc-countries.php +++ b/includes/class-wc-countries.php @@ -1216,10 +1216,10 @@ class WC_Countries { // Add email and phone fields. if ( 'billing_' === $type ) { - if ( 'hidden' !== get_option( 'woocommerce_checkout_phone_field', 'optional' ) ) { + if ( 'hidden' !== get_option( 'woocommerce_checkout_phone_field', 'required' ) ) { $address_fields['billing_phone'] = array( 'label' => __( 'Phone', 'woocommerce' ), - 'required' => 'required' === get_option( 'woocommerce_checkout_phone_field', 'optional' ), + 'required' => 'required' === get_option( 'woocommerce_checkout_phone_field', 'required' ), 'type' => 'tel', 'class' => array( 'form-row-wide' ), 'validate' => array( 'phone' ), diff --git a/includes/customizer/class-wc-shop-customizer.php b/includes/customizer/class-wc-shop-customizer.php index 7a8afcd5678..a2b09ac221c 100644 --- a/includes/customizer/class-wc-shop-customizer.php +++ b/includes/customizer/class-wc-shop-customizer.php @@ -708,7 +708,7 @@ class WC_Shop_Customizer { $wp_customize->add_setting( 'woocommerce_checkout_' . $field . '_field', array( - 'default' => 'optional', + 'default' => 'phone' === $field ? 'required' : 'optional', 'type' => 'option', 'capability' => 'manage_woocommerce', 'sanitize_callback' => array( $this, 'sanitize_checkout_field_display' ),