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"
Author by
Jakub Lang
Updated on January 08, 2022Comments
-
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/
-
Jakub Lang almost 8 yearsThanks, but I need delete not only "Calculations". Choice of shipping will remain :(
-
Jakub Lang almost 8 yearsNice! But shipping disappeared in Checkout :/ I need delete shipping only on Cart page.
-
Sark almost 8 yearsThats simple, you can use
is_cart();
function for that purpose, I have updated my answer too. -
Purvik Dhorajiya almost 8 yearsTry to disable "Enable shipping" options.
-
Jakub Lang almost 8 yearsThank you very much. Working! :-)
-
Sillo about 4 yearsLike 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 almost 4 yearsseems to be outdated