Adding “reply-to” in the email [closed]

Not sure what the WC_Email class does exactly, but if the $headers argument is an array of headers, then you’re almost there. To interpolate a variable value into a string in PHP you don’t have to do the <?php ... stuff because it’ll be rendered as is. Instead, you can use:

$headers = array( "Reply-To: {$order->billing_email}" );

Or:

$headers = array( 'Reply-To: ' . $order->billing_email );

Or:

$headers = array( sprintf( 'Reply-To: %s', $order->billing_email ) );

Also, if the billing e-mail address is user input, don’t forget to validate it with is_email() and/or sanitize it with sanitize_email().

Hope that helps.