cart->get_cart() as $other_cart_item_keys => $values ) { if ( $product_id == $values['product_id'] ) { $running_qty += (int) $values['quantity']; } } return $running_qty; } function wc_qty_get_cart_totals_items_qty() { global $woocommerce; $running_total_qty = 0; // iniializing quantity to 0 // search the cart for all product in and calculate quantity. foreach($woocommerce->cart->get_cart() as $other_cart_item_keys => $values ) { if ( true ) { $running_total_qty += (int) $values['quantity']; } } return $running_total_qty; } ?> Contatti - Azienda Agricola Il Rio