How to Remove WooCommerce Cart Columns

Almost every WooCommerce template has the same table layout for carts. The columns are broken down into the following:

  • Remove
  • Thumbnail
  • Product
  • Price
  • Quantity
  • Subtotal

For a default theme, such as Storefront, that table layout typically looks something like this when all columns are visible (we’ve highlighted the columns in question):

Cart Columns Screenshot
The default cart columns in WooCommerce

Of course, you might not always want to have those columns appear on your cart. This can especially be true if you don’t want people to order multiple items at once, or be able to remove items from the cart, for two examples.

You can remove cart columns from your theme on your own. You’ll need to learn a bit about how WordPress themes work. Plus, there is a little bit of code writing involved. We’ll walk you through the process in this post.

If you’d rather not take the time to do this yourself then consider using our plugin to remove cart columns from your WooCommerce store. We’ll discuss that option more at the end of this tutorial.

How to Hide WooCommerce Cart Columns with Code

The code to remove WooCommerce cart columns is actually some of the more complicated we discuss on this site. It takes a bit of reading and trial-and-error some times to get this to work right so have patience.

Alert! There is a right way and a definite wrong way to edit a WordPress theme. Please make a complete and total backup of your WordPress installation before proceeding. In the event that something goes wrong, you are going to want a working backup to restore from to get your store back online.

Create a Child Theme

It’s not a good idea to modify your WordPress theme files directly. Any changes or adjustments you make to the code of a theme will be lost the next time it receives an update. Luckily, there is a solution for this. You need to create what is called a child theme.

In short, a child theme will pre-load files from another theme (called the parent) before it loads its own files. With this set up you can add code to your child theme that impacts the parent safely. When the parent theme receives an update, the child theme is untouched and all of your code remains intact.

Making a child theme isn’t too difficult. You can put one together in a few minutes using this tutorial on child themes from Smashing Magazine. When you’re ready, come back here and move on to the next step.

Add Code to the Child Theme

Now that your child theme is made you are ready to add some code to it. It’s common to put theme code in a file called functions.php. Create that file, it it doesn’t exist already, and then open it up in any text editor you have handy on your computer.

Add the following lines of code to your functions.php file:

add_action('wp_enqueue_scripts', 'my_remove_cart_columns', 10);
public function my_remove_cart_columns() {
    $options = get_option($this->plugin_name);
    $css = '';

    if (isset($options['cart-column-remove']) && $options['cart-column-remove'] == 1) {
        $css .= ".woocommerce table.cart th.product-remove, .woocommerce table.cart td.product-remove{ display: none !important; }\n";

    if (isset($options['cart-column-thumbnail']) && $options['cart-column-thumbnail'] == 1) {
        $css .= ".woocommerce table.cart th.product-thumbnail, .woocommerce table.cart td.product-thumbnail{ display: none !important; }\n";

    if (isset($options['cart-column-product']) && $options['cart-column-product'] == 1) {
        $css .= ".woocommerce table.cart th.product-name, .woocommerce table.cart td.product-name { display: none !important; }\n";

    if (isset($options['cart-column-price']) && $options['cart-column-price'] == 1) {
        $css .= ".woocommerce table.cart th.product-price, .woocommerce table.cart td.product-price { display: none !important; }\n";

    if (isset($options['cart-column-quantity']) && $options['cart-column-quantity'] == 1) {
        $css .= ".woocommerce table.cart th.product-quantity, .woocommerce table.cart td.product-quantity { display: none !important; }\n";

    if (isset($options['cart-column-subtotal']) && $options['cart-column-subtotal'] == 1) {
        $css .= ".woocommerce table.cart th.product-subtotal, .woocommerce table.cart td.product-subtotal { display: none !important; }\n";

    wp_register_style('my-remove-cart-columns', false);
    wp_add_inline_style('my-remove-cart-columns', $css);

This collection of code is a little more complicated than most. WooCommerce doesn’t have any built-in way in its codebase to remove cart columns. So the fix here is to basically hide the columns themselves before they are displayed to your visitors. We do that using some custom CSS which, in nerd talk, is a way to describe how elements of a web page look.

The code above will remove the following columns. Pick and choose what you want to remove and then delete the other parts of the code for the columns you want to keep:

  • Remove Column: Lines 6 – 8
  • Thumbnail Column: Lines 10 – 12
  • Product Column: Lines 14-16
  • Price Column: Lines 18-20
  • Quantity Column: Lines 22-24
  • Subtotal Column: Lines 26-28

Save the functions.php file when you have the code set the way you want. It’s time to package up your child theme and get it on your live site.

Did we scare you off with that chunk of code? All of this talk about child themes, and code editing, can scare a lot of people off. We haven’t even gotten to the upload part yet. If you would rather have this done for you in minutes we have a solution. Learn how our Remove WooCommerce Features plugins can help you save time.

Upload the Child Theme

You’re ready to get this child theme on your site’s server. First, compress the entire child theme folder into a .zip file. Then you need to log in to the WordPress admin. Find the Themes section of the admin, from the Appearance menu, and look for a button that says “Add New” at the top. That button takes you to another screen with yet another button that says “Upload Theme.” Click that button and follow the upload instructions.

Alternatively, if you are tech-savvy, you can upload your theme straight to the server using FTP. We recommend you check out your hosting provider’s documentation, or support system, for specific instructions on how to upload your child theme this way.

Activate the Child Theme

You’re almost done. Now that your child theme has been uploaded you need to activate it, or turn it on. Go back to the Themes area of the WordPress admin. You should see your child theme among the list of choices. If you don’t then you need to try the upload process again.

When it appears, there will be an “Activate” button next to your theme. Press that button to turn your theme on. The next time you load your site the cart columns you wanted removed should be gone. If they are still there, or your site is experiencing errors, turn the child theme off and check your code. If you make changes, remember you need to upload the child theme and activate it again.

Eventually, you will get the results you are looking for. Of course, this is a lot of work just to hide a few columns in a simple table. Fortunately, there is a much easier and faster way to handle this common WooCommerce problem.

How to Disable WooCommerce Cart Columns the Easy Way

Remove WooCommerce Features can take care of removing any columns from your WooCommerce cart very quickly. It doesn’t require you to learn how to write any code or hire a WordPress developer. Once you have purchased and installed our plugin all you have to do is follow these steps.

Step #1

Go to the WooCommerce section of your WordPress installation’s admin menu and click the link that says Remove Features.

WooCommerce Admin Menu

Step #2

Find the setting for Cart Columns and click the checkbox so that it’s marked like so:

Remove WooCommerce Features - Cart Columns

Step #3

Press the button.

And you’re all done. When you save your settings the columns will be disappear from your cart template immediately. And with Remove WooCommerce Features your changes will stick around no matter what theme you use (or updates it receives).

Our plugin works with dozens of commonly unwanted WooCommerce features. It’s useful for more than just checkout fields. You can check out the entire list of features on our site:

Remove WooCommerce Features Logo