V
V
Vadim Timoshenko2019-05-01 11:56:06
WooCommerce
Vadim Timoshenko, 2019-05-01 11:56:06

Where does the wc_cart_totals_subtotal_html() function start to change?

I am using the wholesale pricing plugin. Everything works well, except for the mini basket in the header. It reflects the total price without discount. And on the shopping cart page - at a discount.
Found the function to display the total cost in the cart - wc_cart_totals_subtotal_html();
I put it in a hat, but in the header it shows the cost without a discount .
Although on the same page in the basket - at a discount.
Apparently inside the basket the function is in some kind of cycle, or why else? Seeking. But so far I can't find the file connection sequence for the cart in Woocommerce.
Maybe someone knows why the value of the same function wc_cart_totals_subtotal_html(); in different parts of the site may be different? Please send.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2019-05-01
@PbI6A_KuT

In general, this function, all it does is call WC()->cart->get_cart_subtotal() https://github.com/woocommerce/woocommerce/blob/d7... in the default cart widget, it is called the same, but directly https://github.com/woocommerce/woocommerce/blob/ma...
there are at first glance 2 reasons, or it's the widget's cache, to change it you need to change the contents of the cart, or in an unusual modification for wholesale prices by a plugin. For good, you need to hang yourself here https://github.com/woocommerce/woocommerce/blob/e7...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question