Snippet: Show SKU in cart and checkout

If you want to display your SKU on the cart and checkout pages, simply add this code to your child theme in the functions.php file. It hooks into the action “woocommerce_cart_item_name” which is perfect.

We hope this helps you in some way.

9 Comments

  1. Thank you very much, this is awesome.

    • Pleasure, awesome to hear 😀

  2. Works GREAT!!! (in the latest woo and wp)
    Thank you

    • Really happy to hear this – thank you!

  3. Unfortunately it doesn’t work with the latest wordpress and divi.

    It seems to ignore the code completely with no errors.

    • Works for us. Where are you adding the code?

      • I tried adding it to the functions.php file in the folder theme/divi-child. I also tried the functions.php page in the theme/divi folder. We are using the default divi shortcode [woocommerce_cart] to display the cart.

        • Try disable other plugins, maybe there is one causing conflict

Submit a Comment

Explore more from Divi Engine

SPIN TO WIN

UPGRADE YOUR DISCOUNT!

  • Get ready to spin and win as we celebrate the Easter Holiday!
  • 1 spin per email
  • No cheating
Try Your Luck
Never
Remind later
No thanks