# Hide Shipping Costs on the Cart Page

> Leaves shipping out of the cart totals so it is only calculated and shown at checkout, once the customer has entered an address.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, shipping, cart
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-hide-shipping-cart-page/

## Code

```php
add_filter( 'woocommerce_cart_ready_to_calc_shipping', function ( $show ) {
    return function_exists( 'is_cart' ) && is_cart() ? false : $show;
}, 99 );
```

## Notes

Applies to the classic cart. The order total on the cart page excludes shipping until checkout.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Hide Shipping Costs on the Cart Page" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
