Phone was required in 3.3 - set default
This commit is contained in:
parent
e15a4f63a0
commit
d73d15a73d
|
@ -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' ),
|
||||
|
|
|
@ -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' ),
|
||||
|
|
Loading…
Reference in New Issue