This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
MiniCart.php - 'wc-block-mini-cart__amount' not displaying correct amount when including tax on product prices on initial page load. #7830
Labels
block: mini-cart
Issues related to the Mini-Cart block.
type: bug
The issue/PR concerns a confirmed bug.
Milestone
Describe the bug
On initial page load the mini-cart is not showing the correct total when you have items already in the cart and you have set tax to be inclusive with prices. Looks to be showing the total amount exclusive of tax. Does however update correctly when hovering over the mini-cart which I'm guessing is handled via a AJAX request.
To reproduce
Steps to reproduce the behaviour:
Expected behaviour
Expected to see Total amount inclusive of tax. Not exclusive on page load.
Line 305 around function 'get_cart_price_markup' should probably include the following after the '$cart_contents_total' variable
if ( $cart->display_prices_including_tax() ) { $cart_contents_total += $cart->get_subtotal_tax(); }
Screenshots
https://i.ibb.co/KNFYv6n/cart-error.gif
Environment
WordPress (please complete the following information):
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: