New phone number in the shipping section
The snippet can be accessed without any authentication.
Authored by
Tomasz Bednarek
Edited
add_filter('woocommerce_checkout_fields','new_phone_field_classic_checkout');
function new_phone_field_classic_checkout($fields) {
$fields['shipping']['shipping_phone'] = array(
'type' => 'number',
'label' => 'Shipping phone',
'priority' => 111,
'required' => false,
'class' => array('form_row_wide'),
'validate' => array('tel'),
'autocomplete' => 'tel',
'placeholder' => 'Shipping phone (if different than in billing)',
);
return $fields;
}
Please register or sign in to comment