• Resolved sula1591

    (@sula1591)


    Hi, thanks for this great plugin. It helps !
    And I have a question .

    The shipping phone used to be visible, both on preview and print. Now it does not show at all since last update.

    Could anyone able to help with this?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Upendra Kapse

    (@wpupen)

    Hello,

    By default, the phone number field is displayed under the order info section below the billing/shipping address section.

    If you want to add an extra phone number field under the shipping address you can use the below-mentioned code snippet in either functions.php file of your theme or using the Code Snippets plugin:

    function wcdn_shipping_address( $shipping_address, $order ) {
    	$shipping_phone     = get_post_meta( $order->get_id(), '<strong>_shipping_phone</strong>', true );
    	$shipping_address               = $shipping_address . '<br>' . $shipping_phone;
    	return $shipping_address;
    }
    add_filter( 'wcdn_address_shipping', 'wcdn_shipping_address', PHP_INT_MAX, 2 );

    In the above code the _shipping_phone is the meta key for your shipping phone number field. So, if your meta key for the shipping phone number field is different you can replace it with your meta key.

    Kind Regards,
    Upendra.

    Thread Starter sula1591

    (@sula1591)

    Hello
    Thanks for your reply.
    I put this code to my code snippet
    and it seems have some error
    ‘Cannot redeclare wcdn_shipping_address (previously declared i’
    something like this . Do you know why ? thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shipping phone Not Present on Invoice’ is closed to new replies.