0

Good day

<?php
    global $woocommerce;
    $items = $woocommerce->cart->get_cart();

       foreach($items as $item => $values) { 
           $_product =  wc_get_product( $values['data']->get_id());
           $price = get_post_meta($values['product_id'] , '_price', true); 
           $qty = $values['quantity'];
           echo $qty;
           $s_total = $price * $values['quantity'];
          echo "<h3 class='checkout-product'>".$_product->get_title().'<span>'.get_woocommerce_currency_symbol().$s_total.'</span></h3>';
  }

?>

i can get only price without quantity and selected variation in checkout page, how can I fix it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.