Search the site:

How to remove the Proceed to checkout button from the Cart page in WooCommerce

The Cart Page of a WooCommerce store helps customers to review their order before proceeding to the Checkout page to make the payment for the same. It is on the Cart page where the customer can delete an item from their virtual basket or increase the quantity of added items. Once the order is finalised, the customer then clicks on the Proceed to checkout button to go to the Checkout page.

remove the Proceed to checkout button from the Cart page in WooCommerce - The WooCommerce Cart page
The WooCommerce Cart page

In many cases though, you may want the customer to skip the Checkout page and instead directly go to the Payment Gateway page and make the payment. As a real world example, for stores which accept payments mostly through PayPal, an exclusive button for it is added using plugins such as Express Checkout, in which case the customer can directly go to the PayPal page by clicking on the PayPal Check out button that appears below the Proceed to checkout button.

remove the Proceed to checkout button from the Cart page in WooCommerce - PayPal buttons added under Proceed to checkout button

 

In case of when the store accepts payments only through PayPal and no other payment method, the “Proceed to checkout” button becomes an overhead for the customer. For these instances, let’s see how we can remove the Proceed to checkout button on the WooCommerce cart page.

Removing the Proceed to checkout button from the Cart page

The following line of code, when added to the functions.php file of your child theme, will result in this button getting removed from the page:

remove_action( 'woocommerce_proceed_to_checkout','woocommerce_button_proceed_to_checkout', 20);

The woocommerce_button_proceed_to_checkout is a function that outputs the Checkout button. By removing this using the woocommerce_proceed_to_checkout hook, the button won’t be rendered.

In this way, your  customers can directly go to the payment gateway page to make the payment:

remove the Proceed to checkout button from the Cart page in WooCommerce - Proceed to checkout button removed

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Tina
Tina
2 years ago

Hi, thanks for your post. I think it can help me a lot. But There are so manly lines of code in functions.php file of my child theme, could you please tell me where exactly to add this line of code?

Amaurydubois
Amaurydubois
1 year ago

Hello, can we do the same for the order button ?

Ann
Ann
9 months ago

This worked. Thanks!

from purchased

Subscribe for more offers

3
0
Would love your thoughts, please comment.x
()
x