Skip to content

Instantly share code, notes, and snippets.

@shreyans94
Created January 23, 2018 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shreyans94/a36f46b06af060cb95ce12e4d3d8d715 to your computer and use it in GitHub Desktop.
Save shreyans94/a36f46b06af060cb95ce12e4d3d8d715 to your computer and use it in GitHub Desktop.
Change subject in woocommerce new order email
/**
* @snippet Add Billing First_name to Email Receipt
* @how-to Watch tutorial @ https://businessbloomer.com/?p=19055
* @sourcecode https://businessbloomer.com/?p=19870
* @author Rodolfo Melogli
* @testedwith WooCommerce 2.5.2
*/
add_filter('woocommerce_email_subject_customer_processing_order', 'bbloomer_change_processing_email_subject', 10, 2);
function bbloomer_change_processing_email_subject( $subject, $order ) {
global $woocommerce;
$subject = $order->billing_first_name . ', Thanks for your order at ' . get_bloginfo( 'name', 'display' ) ;
return $subject;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment