Unfortunately the gift card number isn’t available until the order is marked Complete so it can’t be included in the New Order email.
Thanks for getting back to me!
Can we instead bcc the admin in the customer gift voucher email which would then include the Gift Card code?
You can follow these steps to blind-carbon-copy or carbon-copy an email address:
1. Download the functions.php from your FTP server at /wp-content/themes/<your theme>/functions.php
2. Keep a backup of functions.php in case there are problems.
3. Edit functions.php and scroll to the very end and add this code.
Note: if the last line is “?>” then put this code *above* that line. Otherwise, this code goes at the very end of the file:
function custom_woocommerce_email_headers( $header, $email_id, $gift_card ) {
// Only for "PW Gift Card" email notification
if( 'pwgc_email' !== $email_id ) {
return $header;
}
// Set the email address to be copied.
$formatted_email = utf8_decode( 'Your Name <your@email.com>' );
$header .= "Bcc: " . $formatted_email . "\r\n";
return $header;
}
add_filter( 'woocommerce_email_headers', 'custom_woocommerce_email_headers', 10, 3 );
4. Save the functions.php file and re-upload it to your server.
Replace functions.php with your backup file if you have any problems.
If you want to “Carbon-Copy” rather than “Blind Carbon-Copy”, change the “Bcc” to be “Cc” in the code above.
Let me know if you have any questions!