What is the total order code? - by sande410

This topic has 4 replies, 3 voices, and was last updated 8 years, 2 months ago ago by Stan Russell

  • Avatar: sande410
    sande410
    Participant
    February 7, 2016 at 04:06

    I am trying to modify my tracking code pixels by calling the total cart within my pixel parameters but it is not working.

    I tried using these codes below (including more) but no luck.
    WC()->cart->total
    WC()->cart->get_cart_total
    $woocommerce->cart->get_cart_total
    $woocommerce->cart->total

    Do you happen to know what the variable parameter is for displaying the total cart? I added the tracking codes in my child theme’s function.php file. Thank you.

    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Eva
    Eva Kemp
    Support staff
    February 8, 2016 at 09:48

    Hello,

    If you need code for order total you can find it in the file wp-content/plugins/woocommerce/templates/order/order-details.php:
    $order->get_order_item_totals() as $key => $total

    Regards,
    Eva Kemp.

    Avatar: sande410
    sande410
    Participant
    February 9, 2016 at 18:53

    Thank you!

    Avatar: stan
    Stan Russell
    Participant
    February 10, 2016 at 08:02

    Hello sande410,

    you are welcome!

    Regards,
    Stan Russell.

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘What is the total order code?’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.