Title: missing SKU from email
Last modified: August 31, 2016

---

# missing SKU from email

 *  Resolved [questionabout](https://wordpress.org/support/users/questionabout/)
 * (@questionabout)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/)
 * Hi, how can I bring back the “SKU” to the email? That was the only was I placed
   orders, now I have to login to site and pull info from there.
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6961963)
 * I’ll take a look. Logged an issue for the next release here [https://github.com/woothemes/woocommerce/issues/10107](https://github.com/woothemes/woocommerce/issues/10107)
 *  [Darryl.R](https://wordpress.org/support/users/darrylr/)
 * (@darrylr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962027)
 * Hi Mike
 * I’m also picking up this issue, also there are no sku’s in the backend orders,
   front end cart and front end checkout.
 * I’ve disabled all plugins (except WC), and reverted to the basic Storefront theme,
   still no joy.
 * Thanks!
 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962039)
 * SKUs are never shown in cart – only on the single product pages.
 *  [Darryl.R](https://wordpress.org/support/users/darrylr/)
 * (@darrylr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962040)
 * Ok, I never noticed that! :$
 * But they did show in the emails; and they are missing now – so that’s the main
   issue I’m having.
 * Thanks!
 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962041)
 * Yeah, it will be fixed in admin emails next update.
 *  [Darryl.R](https://wordpress.org/support/users/darrylr/)
 * (@darrylr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962042)
 * Great, thank you!
 *  [thehappycouponer](https://wordpress.org/support/users/thehappycouponer/)
 * (@thehappycouponer)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962161)
 * Do you have a quick-fix for this issue until you guys have the next update ready?
   Our vendors are in big trouble without those SKUs 🙂
 *  Plugin Contributor [Mike Jolley](https://wordpress.org/support/users/mikejolley/)
 * (@mikejolley)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962165)
 * [https://github.com/woothemes/woocommerce/commit/f5e2717b6f4e5cd752b6b05b9d097eee187634e9](https://github.com/woothemes/woocommerce/commit/f5e2717b6f4e5cd752b6b05b9d097eee187634e9)
 *  [Darryl.R](https://wordpress.org/support/users/darrylr/)
 * (@darrylr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962167)
 * thank you Mike!
 *  [thehappycouponer](https://wordpress.org/support/users/thehappycouponer/)
 * (@thehappycouponer)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962175)
 * Awesome! Thanks so much, Mike Jolley!
 *  [Darryl.R](https://wordpress.org/support/users/darrylr/)
 * (@darrylr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962215)
 * Ok, so after the update this works. Thank you.
 * However, I have a custom template that sends an order email based on the customers
   location (via a depot selection on their account) to a specific recipient (not
   an admin) to process the order. This template still works, but now it doesn’t
   show the SKU either.
 * Could you possibly point out where the issue is in the template code?
 *     ```
       <?php
   
       if (!defined('ABSPATH')) exit; ?>
   
       <?php do_action('woocommerce_email_header', $email_heading); ?>
   
       <h2><?php echo __('Order:', 'woocommerce') . ' ' . $order->get_order_number(); ?></h2>
   
       <table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
       	<thead>
       		<tr>
       			<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e('Product', 'woocommerce'); ?></th>
       			<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e('Quantity', 'woocommerce'); ?></th>
       			<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e('Price', 'woocommerce'); ?></th>
       		</tr>
       	</thead>
       	<tbody>
       		<?php echo $order->email_order_items_table( (get_option('woocommerce_downloads_grant_access_after_payment')=='yes' && $order->status=='processing') ? true : false, true, ($order->status=='processing') ? true : false ); ?>
       	</tbody>
       	<tfoot>
       		<?php
       			if ( $totals = $order->get_order_item_totals() ) {
       				$i = 0;
       				foreach ( $totals as $total ) {
       					$i++;
       					?><tr>
       						<th scope="row" colspan="2" style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['label']; ?></th>
       						<td style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['value']; ?></td>
       					</tr><?php
       				}
       			}
       		?>
       	</tfoot>
       </table>
   
       <?php do_action('woocommerce_email_after_order_table', $order, false); ?>
   
       <p><strong>Payment Method: </strong> <?php echo $order->payment_method.' / '.$order->payment_method_title; ?></p>
   
       <?php if (isset($order->customer_note) && !empty($order->customer_note)): ?>
               <p style="color: #737373;"><strong>Note:</strong> <?php echo wpautop(wptexturize( $order->customer_note )) ?></p>
       <?php endif; ?>
   
       <h2><?php _e('Customer details', 'woocommerce'); ?></h2>
   
       <?php
       $user_info = get_userdata($order->user_id);
       ?>
       <p><strong>Username: </strong> <?php echo $user_info->user_login; ?></p>
       <p><strong>Role(s): </strong> <?php echo implode(', ', $user_info->roles); ?></p>
       <p><strong>User ID: </strong> <?php echo $user_info->ID; ?></p>
   
       <?php if ($order->billing_email) : ?>
       	<p><strong><?php _e('Email:', 'woocommerce'); ?></strong> <?php echo $order->billing_email; ?></p>
       <?php endif; ?>
       <?php if ($order->billing_phone) : ?>
       	<p><strong><?php _e('Tel:', 'woocommerce'); ?></strong> <?php echo $order->billing_phone; ?></p>
       <?php endif; ?>
   
       <?php woocommerce_get_template('emails/email-addresses.php', array( 'order' => $order )); ?>
   
       <?php do_action('woocommerce_email_footer'); ?>
       ```
   
 * Thank you!
 *  [Darryl.R](https://wordpress.org/support/users/darrylr/)
 * (@darrylr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962219)
 * Ok, so I did some scratching, and I found that this file **woocommerce/includes/
   abstracts/abstract-wc-order.php** on **line 1951 ** the sku is set to false by
   default. When I changed it to true my email works.
 *     ```
       public function email_order_items_table( $args = array(), $deprecated1 = null, $deprecated2 = null, $deprecated3 = null, $deprecated4 = null, $deprecated5 = null ) {
       		ob_start();
   
       		if ( ! is_null( $deprecated1 ) || ! is_null( $deprecated2 ) || ! is_null( $deprecated3 ) || ! is_null( $deprecated4 ) || ! is_null( $deprecated5 ) ) {
       			_deprecated_argument( __FUNCTION__, '2.5.0' );
       		}
   
       		$defaults = array(
       			'show_sku'   => true,
       			'show_image' => false,
       			'image_size' => array( 32, 32 ),
       			'plain_text' => false
       		);
       ```
   
 * I tried to add this to my Woocommerce folder in my child theme, but it only works
   if I change the original Woocommerce file.
 * Any suggestions on the best way of implementing this without modifying the original
   Woocommerce files?
 * Thank you
 *  [Darryl.R](https://wordpress.org/support/users/darrylr/)
 * (@darrylr)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962227)
 * I solved this by adding a filter and function in my child theme’s functions.php
   file.
 *     ```
       // Filter to override includes abstracts abstract-wc-order array defaults to allow SKU to show in email depot-processing-order
   
       add_filter('email_order_items_table');
       ```
   
 *     ```
       // Override includes abstracts abstract-wc-order defaults array for email order items table function
   
       function email_order_items_table($defaults)
   
       {
       			$defaults = array(
       			'show_sku'   => true,
       			'show_image' => false,
       			'image_size' => array( 32, 32 ),
       			'plain_text' => false
       		);
       }
       ```
   

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘missing SKU from email’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 13 replies
 * 4 participants
 * Last reply from: [Darryl.R](https://wordpress.org/support/users/darrylr/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/missing-sku-from-email/#post-6962227)
 * Status: resolved