Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Show cart item total price including taxes when DISPLAY_CART_PRICES_INCLUDING_TAX is true #3851

Merged
merged 2 commits into from Feb 16, 2021

Conversation

Aljullu
Copy link
Contributor

@Aljullu Aljullu commented Feb 16, 2021

Fixes #3850.

How to test the changes in this Pull Request:

In wp-admin:

  1. Go to WooCommerce > Settings and check the option Enable tax rates and calculations .
  2. Go to WooCommerce > Settings > Tax and set Prices entered with tax to No, I will enter prices exclusive of tax and Display prices during cart and checkout to Including tax.
  3. Go to WooCommerce > Settings > Tax > Standard Rates and create a tax rate for a specific country.

In the frontend:

  1. Add a product to your cart and go to the Cart or Checkout blocks.
  2. Verify the product unitary price and the cart line total show the price including taxes:
Before After
imatge imatge

Changelog

Fix a bug where the total price of items did not include tax in the cart and checkout blocks.

@Aljullu Aljullu added status: needs review type: bug The issue/PR concerns a confirmed bug. block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. labels Feb 16, 2021
@Aljullu Aljullu requested a review from a team as a code owner February 16, 2021 08:43
@Aljullu Aljullu self-assigned this Feb 16, 2021
@Aljullu Aljullu requested review from mikejolley and removed request for a team February 16, 2021 08:43
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2021

Size Change: +90 B (0%)

Total Size: 1.15 MB

Filename Size Change
build/cart-frontend.js 75.7 kB +32 B (0%)
build/cart.js 38.4 kB +24 B (0%)
build/checkout-frontend.js 80.4 kB +19 B (0%)
build/checkout.js 41.3 kB +15 B (0%)
ℹ️ View Unchanged
Filename Size Change
build/active-filters-frontend.js 8.35 kB 0 B
build/active-filters.js 8.52 kB 0 B
build/all-products-frontend.js 34.7 kB 0 B
build/all-products.js 36.4 kB 0 B
build/all-reviews.js 9.89 kB 0 B
build/atomic-block-components/add-to-cart--atomic-block-components/button.js 3.37 kB 0 B
build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js 335 B 0 B
build/atomic-block-components/add-to-cart-frontend.js 9.23 kB 0 B
build/atomic-block-components/add-to-cart.js 7.69 kB 0 B
build/atomic-block-components/button-frontend.js 2.39 kB 0 B
build/atomic-block-components/button.js 840 B 0 B
build/atomic-block-components/category-list-frontend.js 470 B 0 B
build/atomic-block-components/category-list.js 476 B 0 B
build/atomic-block-components/image-frontend.js 1.77 kB 0 B
build/atomic-block-components/image.js 1.23 kB 0 B
build/atomic-block-components/price-frontend.js 1.94 kB 0 B
build/atomic-block-components/price.js 1.96 kB 0 B
build/atomic-block-components/rating-frontend.js 520 B 0 B
build/atomic-block-components/rating.js 526 B 0 B
build/atomic-block-components/sale-badge-frontend.js 857 B 0 B
build/atomic-block-components/sale-badge.js 866 B 0 B
build/atomic-block-components/sku-frontend.js 389 B 0 B
build/atomic-block-components/sku.js 393 B 0 B
build/atomic-block-components/stock-indicator-frontend.js 569 B 0 B
build/atomic-block-components/stock-indicator.js 573 B 0 B
build/atomic-block-components/summary-frontend.js 920 B 0 B
build/atomic-block-components/summary.js 925 B 0 B
build/atomic-block-components/tag-list-frontend.js 465 B 0 B
build/atomic-block-components/tag-list.js 473 B 0 B
build/atomic-block-components/title-frontend.js 1.35 kB 0 B
build/atomic-block-components/title.js 1.21 kB 0 B
build/attribute-filter-frontend.js 18.3 kB 0 B
build/attribute-filter.js 12.5 kB 0 B
build/blocks-checkout.js 16.8 kB 0 B
build/blocks.js 3.49 kB 0 B
build/editor-rtl.css 14.9 kB 0 B
build/editor.css 14.9 kB 0 B
build/featured-category.js 7.83 kB 0 B
build/featured-product.js 10.1 kB 0 B
build/handpicked-products.js 7.51 kB 0 B
build/price-filter-frontend.js 14.6 kB 0 B
build/price-filter.js 9.95 kB 0 B
build/price-format.js 1.34 kB 0 B
build/product-best-sellers.js 7.58 kB 0 B
build/product-categories.js 3.23 kB 0 B
build/product-category.js 8.52 kB 0 B
build/product-new.js 7.75 kB 0 B
build/product-on-sale.js 8.13 kB 0 B
build/product-search.js 3.58 kB 0 B
build/product-tag.js 6.58 kB 0 B
build/product-top-rated.js 7.72 kB 0 B
build/products-by-attribute.js 8.5 kB 0 B
build/reviews-by-category.js 12 kB 0 B
build/reviews-by-product.js 13.5 kB 0 B
build/reviews-frontend.js 9.52 kB 0 B
build/single-product-frontend.js 37.9 kB 0 B
build/single-product.js 10.3 kB 0 B
build/style-rtl.css 18.9 kB 0 B
build/style.css 18.9 kB 0 B
build/vendors--atomic-block-components/price-frontend.js 6.53 kB 0 B
build/vendors-style-rtl.css 1.05 kB 0 B
build/vendors-style.css 1.05 kB 0 B
build/vendors.js 418 kB 0 B
build/wc-blocks-data.js 6.97 kB 0 B
build/wc-blocks-middleware.js 1.1 kB 0 B
build/wc-blocks-registry.js 2.67 kB 0 B
build/wc-payment-method-bacs.js 820 B 0 B
build/wc-payment-method-cheque.js 816 B 0 B
build/wc-payment-method-cod.js 913 B 0 B
build/wc-payment-method-paypal.js 853 B 0 B
build/wc-payment-method-stripe.js 12.2 kB 0 B
build/wc-settings.js 2.4 kB 0 B
build/wc-shared-context.js 1.53 kB 0 B
build/wc-shared-hocs.js 1.69 kB 0 B

compressed-size-action

Copy link
Contributor

@opr opr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tests nicely and the code looks fine :) Thanks Albert!

@opr opr merged commit f161c9a into trunk Feb 16, 2021
@opr opr deleted the fix/3850-cart-item-price-tax branch February 16, 2021 09:45
opr pushed a commit that referenced this pull request Feb 16, 2021
…NCLUDING_TAX is true (#3851)

* Show cart item total price including taxes when DISPLAY_CART_PRICES_INCLUDING_TAX is true

* Show cart item total price including taxes in Checkout block too
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cart item total price doesn't include taxes when DISPLAY_CART_PRICES_INCLUDING_TAX is true
2 participants