Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #item #count #cart #quantitiy #woocommerce
ADD COMMENT
Topic
Name
6+4 =