Hi @tjos123
Sorry that was the wrong template. You can use this if you want the spaces in your email too. On the order confirmation you have to change the template “/order/order-details-customer.php”. You have to replace
<?php echo wp_kses_post( $order->get_formatted_shipping_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?>
with
<?php echo wp_kses_post( $order->get_formatted_shipping_address( esc_html__( 'N/A', 'woocommerce' ) ) ); ?>
<?php if(get_post_meta($order->get_id(), '_shipping_phone', true)) : ?>
<p class="woocommerce-customer-details--phone">
<?php echo wc_make_phone_clickable(get_post_meta($order->get_id(), '_shipping_phone', true)); ?>
</p>
<?php endif; ?>
<?php if(get_post_meta($order->get_id(), '_shipping_email', true)) : ?>
<p class="woocommerce-customer-details--email">
<?php echo esc_html(get_post_meta($order->get_id(), '_shipping_email', true)); ?>
</p>
<?php endif; ?>
The p tags and classes are taken from the default WooCommerce template. If you have another theme with other files the code might be slightly different.
Now the phone and email should be displayer twice. To avoid this, you have to add the following hook to your functions.php:
add_filter('F4/WCSPE/append_fields_to_formatted_address', '__return_false');
This will remove the other email and phone from the address. If you dont use the snippet from my first response, you wont have any email or phone in your shipping address, so I’ll advice to use both.
I dont think anyone has ever used such a customization, if somethings not working correctly, just let us know.