Website Building » WooCommerce » How Do I Hide the Update Cart Button in WooCommerce?

How Do I Hide the Update Cart Button in WooCommerce?

Last updated on October 1, 2022 @ 7:29 pm

If you’re using WooCommerce to sell products on your WordPress site, you may want to hide the “Update Cart” button on the cart page. This can be useful if you’re using a one-page checkout process and don’t want customers to be able to change their cart contents after they’ve clicked the “Place Order” button.

There are two ways to hide the Update Cart button in WooCommerce. The first way is to use a plugin like WooCommerce One Page Checkout.

This plugin will automatically hide the Update Cart button on the cart page when it’s activated.

The second way to hide the Update Cart button is to add a bit of code to your WordPress theme. You can add this code to your theme’s functions.php file or a child theme:

How Do I Hide the Update Cart Button in WooCommerce?

If you’re using WooCommerce to sell products on your WordPress site, you may want to hide the “Update Cart” button on the cart page.

There are two ways to hide the Update Cart button in WooCommerce.

The first way is to use a plugin like WooCommerce One Page Checkout. This plugin will automatically hide the Update Cart button on the cart page when it’s activated.

PRO TIP: If you are considering hiding the Update Cart button in WooCommerce, please be aware that this may cause unexpected behavior for your customers. In particular, if they attempt to update their cart and the button is not visible, they may become frustrated and leave your site without completing their purchase.

The second way to hide the Update Cart button is to add a bit of code to your WordPress theme.php file or a child theme:

add_filter( 'woocommerce_cart_needs_payment', '__return_true' );

Once you’ve added this code, the Update Cart button will be hidden on the cart page. Note that this code will also hide the “Proceed to Checkout” button on the cart page, so you’ll need to add a bit of additional code if you want to keep that button visible.

add_filter( 'woocommerce_cart_needs_payment', '__return_false' );

If you’re using a one-page checkout plugin like WooCommerce One Page Checkout, you can also use its built-in settings to hide the Update Cart button. To do this, go to WooCommerce > Settings > One Page Checkout and check the “Hide update cart button” setting.

How Do I Hide the Update Cart Button in WooCommerce?
There are two ways that you can go about hiding the update car button in WooCommerce.

The first way would be through installing and activating plugins like WooCommerce One Page Checkout which would automatically do it for you.

Or secondly, by adding a bit of custom code into your WordPress theme by either adding it into your theme’s .php file or by using a child theme.

Once added, simply go back and check if it worked by visiting your website’s cart page.

If done correctly, then voila! The update cart button would have been successfully hidden away!

Morgan Bash

Morgan Bash

Technology enthusiast and Co-Founder of Women Coders SF.