Found the following code in another thread:
<?php
global $woocommerce;
$items = $woocommerce->cart->get_cart();
foreach($items as $item => $values) {
$_product = wc_get_product( $values['data']->get_id());
echo "<b>".$_product->get_title().'</b> <br> Quantity: '.$values['quantity'].'<br>';
$price = get_post_meta($values['product_id'] , '_price', true);
echo " Price: ".$price."<br>";
}
?>
I'm a rookie when it comes to adding code.
Simple question: Where do I add this php code?
I have a test site, and would like to see the cart data (in order to try add some other customized code).
Will it simply print onto the page? Will it replacing the standard cart view? Can I view both? Optimally it would open a new small browser window or gadget to show the "raw" data.