/** * Show SKU in the cart */ // Displays the SKU for a product (if it exists) below the product name in the cart // https://www.businessbloomer.com/woocommerce-show-sku-cart-page/ add_action('woocommerce_after_cart_item_name', 'cc_show_sku_in_cart', 11, 2); function cc_show_sku_in_cart($cart_item, $cart_item_key) { $_product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key); $sku = $_product->get_sku(); if ( ! $sku ) return; echo '

SKU: ' . $sku . '

'; }