How I can get cart_contents_count for childs ticket

  • Member
    dominikana
    October 30, 2017 at 7:00 pm #2389

    Hi,

    I wanna make price = 40$ * the number of tickets (adults + children).
    For example: I buy 3 tickets for adults and 2 for children.
    So total price is = $40 * (3+2)

    My problem is:
    How I can get numbers of tickets from children.

    My code parts the:

    global $woocommerce;
    $number_adults = $woocommerce->cart->cart_contents_count; // I have ticket for adults

    How I can get ticket for children.

    It’s all 🙂

    Sorry, this forum is for verified users only. Please Login

Comments are closed.