Viewing 1 replies (of 1 total)
  • Plugin Author Matt Harrison

    (@matt-h-1)

    That is a feature supported by WooCommerce directly and not part of the Address Book plugin, but the Address Book supports any custom fields added to addresses.

    You can use this or many of the other address field editors: https://woocommerce.com/products/woocommerce-checkout-field-editor/

    Or an example if you wanted to just do this directly yourself.

    add_filter( 'woocommerce_shipping_fields', 'custom_override_shipping_fields' );
    function custom_override_shipping_fields( $fields ) {
        $fields['shipping_phone'] = array(
            'label'       => __('Shipping Phone', 'woocommerce'),
            'placeholder' => _x('Phone', 'placeholder', 'woocommerce'),
            'required'    => true,
            'class'       => array('form-row-wide'),
            'clear'       => true
        );
    
        return $fields;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Input field for telephone number’ is closed to new replies.