SKU is a stock keeping unit.
It is an alpha numeric text assigned to a product.
This can be used to identify the price, product options and manufacturer of the merchandise.

If you set the SKU for each product (and each variation) WooCommerce will display it on the product page.

It won't, however, display it on the checkout page. For some people this might be important.

Mark has created a nice snippet that you can add it to your functions.php file or a custom plugin to a show the SKU.

<?php

// credit: https://markeviota.com/woo-show-sku
add_filter( 'woocommerce_cart_item_name', 'showing_sku_in_cart_items', 99, 3 );
function showing_sku_in_cart_items( $item_name, $cart_item, $cart_item_key  ) {
	// The WC_Product object
	$product = $cart_item['data'];

	if (empty($product)) {
		return $item_name;
	}

	// Get the  SKU
	$sku = $product->get_sku();

	// When sku doesn't exist
	if (empty($sku)) {
		return $item_name;
	}

	// display the sku
	$item_name .= '
' . __( "SKU: ", "woocommerce") . $sku . ''; return $item_name; }

 

Here's video tutorial and explanation how to use this code.

 

 

 

Do you need any of the code in this post customized or packaged into a plugin? Get a free quote
Referral Note: When you purchase through a referral link (if any) on this page, we may earn a commission.
If you're feeling thankful, you can buy me a coffee or a beer