Merge pull request #18624 from Chunkford/patch-4

Display zero value when using shipping classes
This commit is contained in:
Mike Jolley 2018-02-22 12:22:58 +00:00 committed by GitHub
commit b93f719b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ function wc_cart_totals_fee_html( $fee ) {
function wc_cart_totals_shipping_method_label( $method ) { function wc_cart_totals_shipping_method_label( $method ) {
$label = $method->get_label(); $label = $method->get_label();
if ( $method->cost > 0 ) { if ( $method->cost >= 0 && $method->get_method_id() !== 'free_shipping' ) {
if ( WC()->cart->display_prices_including_tax() ) { if ( WC()->cart->display_prices_including_tax() ) {
$label .= ': ' . wc_price( $method->cost + $method->get_shipping_tax() ); $label .= ': ' . wc_price( $method->cost + $method->get_shipping_tax() );
if ( $method->get_shipping_tax() > 0 && ! wc_prices_include_tax() ) { if ( $method->get_shipping_tax() > 0 && ! wc_prices_include_tax() ) {