Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Basilakis/94acdc2a9e544a701abd to your computer and use it in GitHub Desktop.
Save Basilakis/94acdc2a9e544a701abd to your computer and use it in GitHub Desktop.
Add customer name to WooCommerce Admin New Order Email subject
// 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
Copy link

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