Home Forums WoodMart support forum Phone must be required in shipping information

Phone must be required in shipping information

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #661030

    webmaster-1128
    Participant

    Hi,
    Our shipping partners constantly require us to provide the customer’s phone number. It is mandatory to request it for shipping purposes, but this field does not appear in the Checkout Fields Manager. How can I force the phone number field to be required? I also tried with:
    add_filter( ‘woocommerce_shipping_fields’, ‘obligar_telefono_envio’ );
    function obligar_telefono_envio( $fields ) {
    $fields[‘shipping-phone’][‘required’] = true;
    $fields[‘shipping-phone’][‘label’] = ‘Teléfono’;
    $fields[‘shipping-phone’][‘placeholder’] = ‘Teléfono’;
    return $fields;
    }
    but it is not working. Please help.

    Attachments:
    You must be logged in to view attached files.
    #661034

    webmaster-1128
    Participant

    Making the billing phone mandatory does not change anything

    #661036

    webmaster-1128
    Participant

    I also tried : add_filter( \’woocommerce_shipping_fields\’, function( $fields ) {
    $fields[\’shipping_phone\’][\’required\’] = true;
    $fields[\’shipping_phone\’][\’label\’] = \’Phone (required for delivery)\’;
    return $fields;
    });

    #661062

    Hung Pham
    Keymaster

    Hi webmaster-1128,

    Thanks for reaching to us.

    Please read our documentation for more details https://xtemos.com/docs-topic/fields-manager/

    Regards,

    #661152

    webmaster-1128
    Participant

    Hi Hung Pham, I see you might have missed an important part of my request. As I explained, my urgent concern is about the phone number in the shipping details.

    #661254

    Hung Pham
    Keymaster

    Hi webmaster-1128,

    By default, WooCommerce does not include a phone field in the shipping details section of the checkout page. For specialized assistance and potential solutions, I kindly suggest that you reach out directly to the WooCommerce plugin’s support team https://wordpress.org/support/plugin/woocommerce/, who are better equipped to provide you with the guidance you requires or You need to find a third party plugin to achieve more functionality that best suits you.

    Regards,

    #661300

    webmaster-1128
    Participant

    OK, thanks. I see this will take some time to resolve. Even in the three shops I manage, shipping agencies are constantly asking for phone numbers. Is this requirement only applicable in Europe?

    Do you know if the template allows adding a message in the checkout to encourage customers to provide their ‘optional’ phone number, warning them that we cannot guarantee delivery times otherwise?

    #661301

    webmaster-1128
    Participant

    I noticed that the checkout layout in your demo is different from what I currently have on my live site.
    In the demo, the checkout starts with the Billing Address first, and only asks for a Shipping Address if it is different (optional).
    However, on my live site, the checkout starts directly with the Shipping Address, making it seem mandatory, with the Billing Address shown afterward as optional.
    Which option do I need to check or configure to have this layout on my site?

    #661403

    Hung Pham
    Keymaster

    Hi webmaster-1128,

    Thanks for your patience.

    Remove the Gutenberg blocks from the Cart page – https://prnt.sc/-kOUFcZ3FJVq and define the [woocommerce_cart] shortcode instead. https://woocommerce.com/document/woocommerce-shortcodes/

    Regards,

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)