• Hi There,

    I have a problem with the woocommerce order details page/email and that is it doesn’t list the customer phone number. It is a mandatory field on my billing info page, but it doesn’t appear anywhere on the notification page or email.

    Can I do something to correct this? I need to collect customer phone numbers for shipping purposes, and I need them to display on the order confirmation too ??

    Many thanks.
    Reka

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi!

    I looked at your site and only thing that looked off to me was that html id of your phone field is shipping_phone. I think it should be billing_phone. Looks like there is some problem with the customisation of the feilds.

    Thread Starter thehoundproject

    (@thehoundproject)

    Hi,

    Thanks for your response. I will copy in the code that I use to populate the phone number field on the cart page:

    }
    add_action(‘wp_enqueue_scripts’,’delphinus_dequeue_plugins_css’);

    // Hook in
    add_filter( ‘woocommerce_checkout_fields’ , ‘wc_shippping_phone’ );

    // Our hooked in function – $fields is passed via the filter!
    function wc_shippping_phone( $fields ) {
    $fields[‘billing’][‘shipping_phone’] = array(
    ‘label’ => __(‘Phone’, ‘woocommerce’),
    ‘placeholder’ => _x(‘Phone’, ‘placeholder’, ‘woocommerce’),
    ‘required’ => true,
    ‘class’ => array(‘form-row-wide’),
    ‘clear’ => true
    );

    return $fields;
    }

    I changed the billing to shipping because I want the phone number at the billing section, as the shipping section is optional. If it’s the same as the billing, then the customer just ticks the box and the system automatically pulls this is.

    So do you have any suggestions for me?
    Many thanks.

    Reka

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce order confirmation page and email doesn’t list phone number’ is closed to new replies.