I’m trying to get the SKU of all the products in my cart.
In the past i tried something similar with the product names. I did it like this:

global $woocommerce;
$items = $woocommerce->cart->get_cart();
$product_names=array();
foreach($items as $item => $values) { 
    $_product = $values['data']->post; 
    $product_names[]=$_product->post_title; 
} 

Is there a way like this but instead of the title get the SKU of a product?

Read more here: Get SKU of product in cart WordPress


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: