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

Commit

Permalink
Fix Fees not visible in Cart & Checkout blocks when order doesn't nee…
Browse files Browse the repository at this point in the history
…d shipping (#3521)
  • Loading branch information
Aljullu committed Dec 21, 2020
1 parent a334951 commit 8f7ff40
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions assets/js/base/components/cart-checkout/totals/fees/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import { __ } from '@wordpress/i18n';
import { DISPLAY_CART_PRICES_INCLUDING_TAX } from '@woocommerce/block-settings';
import { useShippingDataContext } from '@woocommerce/base-context';
import PropTypes from 'prop-types';

/**
Expand All @@ -12,10 +11,6 @@ import PropTypes from 'prop-types';
import TotalsItem from '../item';

const TotalsFees = ( { currency, values } ) => {
const { needsShipping } = useShippingDataContext();
if ( ! needsShipping ) {
return null;
}
const { total_fees: totalFees, total_fees_tax: totalFeesTax } = values;
const feesValue = parseInt( totalFees, 10 );

Expand Down

0 comments on commit 8f7ff40

Please sign in to comment.