# Custom Empty Cart Message

> Replaces "Your cart is currently empty" on the classic cart page with a friendlier message of your own.

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

## Code

```php
add_filter( 'wc_empty_cart_message', function () {
    return 'Your cart is empty for now. Browse our bestsellers and find something you love.';
} );
```

## Notes

The Cart block has its own empty cart template you can edit in the Site Editor.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Custom Empty Cart Message" 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/
