5

In the latest release of WooCommerce, there is a message being displayed in the cart stating the shipping cost is only an estimate.

https://www.screencast.com/t/2hSd7B27I

This doesn't make any sense when someone is using flat rate shipping and does not calculate shipping at all. Note, I don't have calculated shipping activated either. I tried to hide the message with css, however it of course, does not have a class to target.

Does anyone know how to turn this off?

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
Christian Rea
  • 53
  • 1
  • 1
  • 4

4 Answers4

7

Now you can use woocommerce_shipping_estimate_html filter.

Eg.:

function shipping_estimate_html()
{
    return null;
}
add_filter('woocommerce_shipping_estimate_html', 'shipping_estimate_html');
kanlukasz
  • 1,103
  • 19
  • 34
4

This is something new since Woocommerce version 3.5: You will need to override via your theme (as explained on this link) the template file cart/cart-shipping.php.

From line 46 to 58, you will replace the following:

<?php if ( is_cart() ) : ?>
    <p class="woocommerce-shipping-destination">
        <?php
        if ( $formatted_destination ) {
            // Translators: $s shipping destination.
            printf( esc_html__( 'Estimate for %s.', 'woocommerce' ) . ' ', '<strong>' . esc_html( $formatted_destination ) . '</strong>' );
            $calculator_text = __( 'Change address', 'woocommerce' );
        } else {
            echo esc_html__( 'This is only an estimate. Prices will be updated during checkout.', 'woocommerce' );
        }
        ?>
    </p>
<?php endif; ?>

By this:

<?php if ( is_cart() ) : ?>
    <p class="woocommerce-shipping-destination">
        <?php
        if ( $formatted_destination ) {
            $calculator_text = __( 'Change address', 'woocommerce' );
        }
        ?>
    </p>
<?php endif; ?>

You are done… No more annoying notices.

LoicTheAztec
  • 229,944
  • 23
  • 356
  • 399
2

In the event your Template doesn't have a cart-shipping.php file, this css modification worked for me:

.cart-totals-inner .woocommerce-shipping-destination {
display: none; }
Prometheus
  • 21
  • 1
1

Also you can try to hide it using custom CSS:

.woocommerce-shipping-destination {visibility: hidden;}
  • I've added the "display: none;" property to not only hide but remove the empty space previously occupied by that shipping text – mcarra66 Aug 01 '20 at 07:42