• I’m trying to add a shipping phone number to my woocommerce checkout page. I’ve got the field added with the code supplied. I need to get it to pull through to woocommerce in the admin area, so when orders are sent I can give fed-ex the shipping phone number (it’s overnight crab shipping, so they need to be able to contact the recipient.)

    here’s the code I got from woocommerce

    // Hook in
    add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
    
    // Our hooked in function - $fields is passed via the filter!
    function custom_override_checkout_fields( $fields ) {
         $fields['shipping']['shipping_phone'] = array(
            'label'     => __('Phone', 'woocommerce'),
        'placeholder'   => _x('Phone', 'placeholder', 'woocommerce'),
        'required'  => false,
        'class'     => array('form-row-wide'),
        'clear'     => true
         );
    
         return $fields;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce – Add Shipping Phone Number’ is closed to new replies.