Fix Fees not visible in Cart & Checkout blocks when order doesn't need shipping (https://github.com/woocommerce/woocommerce-blocks/pull/3521)

This commit is contained in:
Albert Juhé Lluveras 2020-12-21 14:15:27 +01:00 committed by GitHub
parent 28ffe1be49
commit e3d97d7387
1 changed files with 0 additions and 5 deletions

View File

@ -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';
/**
@ -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 );