item count in cart quantitiy woocommerce

278

item count in cart quantitiy woocommerce -

function count_item_in_cart() {
    $count = 0;
    foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
        $count++;
    }
    return $count;
}

Comments

Submit
0 Comments