Update wc-cart-functions.php

Alteration to the proposed changes to take into account free shipping so the price isn't displayed
This commit is contained in:
Chunkford 2018-01-31 11:58:37 +00:00 committed by GitHub
parent e831406d9f
commit 4af291c38c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -342,7 +342,7 @@ function wc_cart_totals_fee_html( $fee ) {
function wc_cart_totals_shipping_method_label( $method ) {
$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() ) {
$label .= ': ' . wc_price( $method->cost + $method->get_shipping_tax() );
if ( $method->get_shipping_tax() > 0 && ! wc_prices_include_tax() ) {