How can I remove Shipping from a WooCommerce cart?

51,109

Solution 1

Add the following snippet to your functions.php file:

function disable_shipping_calc_on_cart( $show_shipping ) {
    if( is_cart() ) {
        return false;
    }
    return $show_shipping;
}
add_filter( 'woocommerce_cart_ready_to_calc_shipping', 'disable_shipping_calc_on_cart', 99 );

Solution 2

Please follow the below steps:

Step 1 - There’s actually a setting for this: disable it under WooCommerce > Shipping

Step 2 - Uncheck "Enable the shipping calculator on the cart page"

Share:
51,109
Jakub Lang
Author by

Jakub Lang

Updated on January 08, 2022

Comments

  • Jakub Lang
    Jakub Lang over 2 years

    I need to remove shipping and shipping calculate from a cart. Is it possible to delete with hooks?

    The template is: http://flatsome.uxthemes.com/cart/

    WooCommerce Cart

  • Jakub Lang
    Jakub Lang almost 8 years
    Thanks, but I need delete not only "Calculations". Choice of shipping will remain :(
  • Jakub Lang
    Jakub Lang almost 8 years
    Nice! But shipping disappeared in Checkout :/ I need delete shipping only on Cart page.
  • Sark
    Sark almost 8 years
    Thats simple, you can use is_cart(); function for that purpose, I have updated my answer too.
  • Purvik Dhorajiya
    Purvik Dhorajiya almost 8 years
    Try to disable "Enable shipping" options.
  • Jakub Lang
    Jakub Lang almost 8 years
    Thank you very much. Working! :-)
  • Sillo
    Sillo about 4 years
    Like the label on the screenshot says, this setting will only disable shipping calculations. The comment suggesting: Try to disable "Enable shipping" options, will disable shipping entirely.
  • André Kelling
    André Kelling almost 4 years
    seems to be outdated