0

function wc_customer_details( $fields, $sent_to_admin, $order ) {
 if ( empty( $fields ) ) {
  if ( $order->get_billing_email() ) {
   $fields['billing_email'] = array(
    'label' => __( 'Email address', 'woocommerce' ),
    'value' => wptexturize( $order->get_billing_email() ),
   );
  }
  if ( $order->get_billing_phone() ) {
   $fields['billing_phone'] = array(
    'label' => __( 'Phone', 'woocommerce' ),
    'value' => wptexturize( $order->get_billing_phone() ),
   );
  }
 }
 return $fields;
}
add_filter( 'woocommerce_email_customer_details_fields', 'wc_customer_details', 10, 3 );

Jagdish Sarma Asked question March 10, 2022
Add a Comment