Forked from bekarice/wc-admin-new-order-email-change-subject.php
Last active
February 27, 2020 22:06
-
-
Save Basilakis/94acdc2a9e544a701abd to your computer and use it in GitHub Desktop.
Add customer name to WooCommerce Admin New Order Email subject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adds customer first and last name to admin new order email subject | |
function skyverge_add_customer_to_email_subject( $subject, $order ) { | |
$subject = 'New Customer Order - (# ' . $order->get_order_number() . ') from ' . $order->get_billing_first_name() . ' ' . $order->get_billing_last_name(); | |
return $subject; | |
}; | |
add_filter( 'woocommerce_email_subject_new_order', 'skyverge_add_customer_to_email_subject', 10, 2 ); |
@Uriel1339 A reason that details from a client site are included? :)
I have updated the code, thank you for sharing!!
Oh sorry lol. Was just copy-pasta because we hardcode site name to minimize WooCommerce calls.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Above is obsolete code, should be updated to this: