I've looked all over and haven't figured this out, but am close. I purchased the Woocommerce wishlist and I am trying to have the SKU as well as price, quantity, etc.
I found this code to add to the functions.php file:
add_filter( 'woocommerce_in_cart_product_title', 'add_sku_in_cart', 20, 3);
function add_sku_in_cart( $title, $values, $cart_item_key ) {
$sku = $values['data']->get_sku();
return $sku ? $title . sprintf(" (SKU: %s)", $sku) : $title;
}
However I don't know how to use the function in the cart or wishlist file. I'm practicing in the Cart and assume that the Wishlist would be the same.
I tried YITH Wishlist plugin and was successful in getting the SKU to that wishlist using this code (thanks to skrilled):
<?php echo $product_obj->get_sku(); ?>
However, that same code does not seem to work using the Woocommerce Wishlist plugin.
Thanks.
For woocommerce wishlist plugin: