Advertisement
majeedraza

WooCommerce - Add content to email headers

Jul 27th, 2018
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2. // WooCommerce - Add content to email headers
  3. // Email templates are not affected by this method
  4. add_action( 'woocommerce_email_header', 'custom_email_header', 20, 2 );
  5. function custom_email_header( $email_heading, $email ) {
  6.   $order = $email->object;
  7.   print 'Order No. '.$order->get_order_number( ); // example
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement