Would you like to let customers empty their cart in a single click? The Clear Cart module in Merchant adds a button to your Cart page, mini cart, and side cart that removes all items at once, and you can fully customize its behavior, placement, design, and label.
In this guide, we’ll walk you through how to configure and enable the Clear Cart module in Merchant.
Before you get started, make sure you’ve installed and activated the Merchant plugin on your WordPress site. If you’re using premium modules, ensure you have Merchant Pro installed and active.
Here’s what a Clear Cart button looks like on a WooCommerce Cart page:

1. Open the Clear Cart module
Open your Merchant dashboard by clicking the Merchant menu in the left sidebar of your WordPress admin area. Find the Improve Experience section, then click the Clear Cart module to open its settings page.

2. Configure the behavior of the module
On the module’s admin page, find the Settings panel, where you control how the module behaves and what message it shows customers:
- Cart Item Threshold: The minimum number of items in the cart before the Clear Cart button appears.
- Clear Cart After Inactivity: Shows a prompt to clear the cart after a period of no activity. When enabled, you also get:
- Time of Cart Session Expiration: The number of hours before the inactivity prompt appears (default value: 24).
- Inactive Confirmation Message: The message shown in the inactivity prompt (default value: “It looks like you haven’t been active for a while. Would you like to empty your shopping cart?”).
- Confirmation Message: Shown only when Clear Cart After Inactivity is off. The message in the confirmation dialog before a customer clears their cart (default value: “Are you sure you want to empty your shopping cart?”).
- Redirect URL after Clearing the Cart: Where the page redirects after a customer clears their cart: None, Home, Shop, or Custom (which lets you enter a custom URL).

If you changed any default values, click the Save button in the top-right corner of the page.
3. Customize the placement of your Clear Cart buttons
Find the Placement panel below Settings. It lets you enable or disable the Clear Cart button at different locations and set its position at each one:
- Cart Page: Show or hide the button on your Cart page. When enabled:
- Position: After Coupon Button, After Update Cart Button, or After Cart Table.
- Mini Cart: Show or hide the button in your mini cart. When enabled:
- Position: Before View Cart Button, After View Cart Button, or After Checkout Button.
- Side Cart: Show or hide the button in your side cart. This requires the Side Cart module to be active. When enabled:
- Position: Before View Cart Button, After View Cart Button, or Before Checkout Button.

If you made any changes, click the Save button in the top-right corner of the page.
4. Fine-tune the look and feel of the button
Find the Look and Feel panel below Placement, where you can change the design and label of the button:
- Label: The text on the button (default value: “Clear Cart”).
- Style: Choose Solid (solid background), Outline (transparent background with a border), or Text (label only).
- Border Radius: Round the corners of the button (default value: 0px).
- Padding Top and Bottom: The top and bottom padding of the button (default value: 15px).
- Padding Left and Right: The left and right padding of the button (default value: 25px).
- Button Background Color: The background color of the button (default value: #212121).
- Button Background Hover Color: The background color on hover (default value: #414141).
- Button Text Color: The text color of the button (default value: #ffffff).
- Button Text Hover Color: The text color on hover (default value: #ffffff).
- Font size: The font size of the button label (default value: 16px).

If you changed any default values, click the Save button in the top-right corner of the page.
5. Activate the module’s shortcode (optional)
Find the Use shortcode panel below Look and Feel. The shortcode lets you place Clear Cart buttons in custom positions the module’s settings don’t cover. It’s a developer option, so only activate it if you understand how shortcodes work in WordPress. When the shortcode is active, the buttons added through the module’s settings disappear, since the shortcode controls placement instead.
The module’s shortcode is:
[merchant_module_clear_cart]
To activate it, toggle the Use shortcode option on, then click the Save button at the top of the page:

6. Enable the module
To activate the Clear Cart module, click the Enable button at the top of the page:

Frequently asked questions
Below, we’ve answered some of the most common questions about the Clear Cart module.
Does the button ask for confirmation before emptying the cart?
Yes. A confirmation dialog appears before the cart is cleared, and you can customize its message with the Confirmation Message option.
Can I show the button in the side cart?
Yes, as long as the Side Cart module is active on your site. Then enable the Side Cart toggle in the Placement panel and choose a position.
That’s it! You’ve successfully set up the Clear Cart module in Merchant to give shoppers an easy way to empty their cart.
Next, would you like to add a slide-out cart to your store? Check out our guide on the Side Cart module to learn more.
